0
0

Hello! I’m having issues :(

[code:1tx07sww]HRSRC rec;
HGLOBAL handle;
void *data;
int length;

rec = FindResource(GetModuleHandle(NULL), "IDR_MP31", RT_RCDATA);
if(rec == NULL)
MessageBox(NULL,"Error 1","ERROR",MB_OK|MB_ICONEXCLAMATION);

handle = LoadResource(NULL, rec);
if(handle == NULL)
MessageBox(NULL,"Error 2","ERROR",MB_OK|MB_ICONEXCLAMATION);

data = LockResource(handle);
length = SizeofResource(NULL, rec);

stream = FSOUND_Stream_Open((char*)data, FSOUND_LOADMEMORY, 0, length);

if (!stream) {
FSOUND_Close();
return 1;
}[/code:1tx07sww]

Error1! MessageBox
Error2! MessageBox
And then the function returns as an error :[

So obviously there has to be something wrong with the resource; 128.rc!! Well, I’m using VC++ with VS.NET 2003. I added Yay.mp3 as a resource of type: MP3. The ID is: IDR_MP31. External File = false. The EXE file is really big (so the mp3 must be in there! There’s also a file: 128.res that is also just as big.) But for some reason the MP3 isn’t loading! Any ideas? Because I’ve been on this for a long time!

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.