Ok, I’ve got this far with the piece of code.
hrInfo = FindResource(hInstance,MAKEINTRESOURCE(IDR_WAVE),TEXT(“WAVE”));
hr = LoadResource(hInstance, hrInfo);
LPVOID test = LockResource(hr);
The problem now is that the type test is different from the one required in the FSOUND_Sample_Load (which is const char *). If I try to cast the types nothing happens. Can anyone help?
Ok, after spending the last day sorting this out, I have now come up with this code for any newbie (like me) who is interested.
hrInfo = FindResource(myInstance,MAKEINTRESOURCE(IDR_MUSIC2),_T(“MUSIC”));
hr = LoadResource(myInstance, hrInfo);
hmusic =FSOUND_Sample_Load(FSOUND_FREE, static_cast<const char*>(hr), FSOUND_LOADMEMORY,SizeofResource(myInstance,hrInfo));
Please login first to submit.