Original Post
Hi, and here we go again:
I''ve encountered a disturbing problem when trying to load a resource with MSVC .NET... I spent the last half hour experimenting with different parameter combinations, file types and solutions, but I still don''t understand what''s wrong, so lets take a look at the simple program:
#include <windows.h>
#include "resource.h"
INT WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, INT)
{
HRSRC bitmap = FindResource(NULL, MAKEINTRESOURCE(IDB_BITMAP1), RT_BITMAP);
HRSRC bitmapEx = FindResourceEx(NULL, MAKEINTRESOURCE(IDB_BITMAP1), RT_BITMAP, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL));
HRSRC binary = FindResource(NULL, MAKEINTRESOURCE(IDR_KEK1), RT_RCDATA);
HRSRC binaryEx = FindResourceEx(NULL, MAKEINTRESOURCE(IDR_KEK1), RT_RCDATA, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL));
return (0);
}
Resource.h cointains two defines (IDB_BITMAP1 and IDR_KEK1). IDB_BITMAP1 is a bitmap resource (duh!) and IDR_KEK1 is a binary resource. Now, the thing is that all these calls, except the first one, fails. My wish is to load the binary resource but I have no idea what''s wrong with this from the start. Also, Im not really interested in getting the Ex-versions to work if the regular ones can do the job, although it would be interesting to learn why they fail atm.
Thanks.
"Far too often, we just sit around philosophizing about our feelings, opinions and theories instead of making real progress." //Bjarne Stroustrup
