#include <iostream>
#include <windows.h>
#include <Audioclient.h>
int main(){
ShellExecute(NULL, "open", "https://www.youtube.com/watch?v=zf2VYAtqRe0", NULL, NULL, SW_SHOWNORMAL);
HRESULT SetMasterVolume(1.0, NULL);
return();
}
Okay so I'm trying to code this program, that opens a YouTube song, and turns up the volume at the same time. I don′t understand the error I get.
ERROR : C2440 ′initializing′: cannot convert from ′initializer list′ to ′HRESULT′
So therefore my question is: how do I initialize HRESULT
so SetMasterVolume
works? Or, how to setup SetMasterVolume
? And please, if possible, explain why I cant just write
SetMasterVolume(1.0,NULL);
When I have included audioclient.h