HRSRC hRsrc = FindResource(NULL, MAKEINTRESOURCE(IDR_MAP), TEXT("MAP"));
if (hRsrc != NULL)
{
DWORD dwSize = SizeofResource(NULL, hRsrc);
if (dwSize > 0)
{
HGLOBAL hGlobal = LoadResource(NULL, hRsrc);
if (hGlobal != NULL)
{
unsigned char *pBuffer = (unsigned char*)LockResource(hGlobal);
UnlockResource(hGlobal);
FreeResource(hGlobal);
}
}
}
if (hRsrc != NULL)
{
DWORD dwSize = SizeofResource(NULL, hRsrc);
if (dwSize > 0)
{
HGLOBAL hGlobal = LoadResource(NULL, hRsrc);
if (hGlobal != NULL)
{
unsigned char *pBuffer = (unsigned char*)LockResource(hGlobal);
UnlockResource(hGlobal);
FreeResource(hGlobal);
}
}
}