Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HMODULE hExe = LoadLibrary("TestRes.exe");
- EnumResourceTypes(hExe, (ENUMRESTYPEPROC)ResTypes, 0);
- // Find the group resource which lists its images
- /* Need to set "IconGrpName" this from ResTypee */
- HRSRC hRsrc = FindResource( hExe, MAKEINTRESOURCE(1), RT_GROUP_ICON );
- // Load and Lock to get a pointer to a GRPICONDIR
- HGLOBAL hGlobal = LoadResource( hExe, hRsrc );
- GRPICONDIR *lpIconGroup = new GRPICONDIR[ SizeofResource( hExe, hRsrc ) ];
- RtlZeroMemory( lpIconGroup, SizeofResource( hExe, hRsrc ) );
- lpIconGroup = (GRPICONDIR*)LockResource( hGlobal );
- // We now have the header of the icon file now we need all the icons.
- cout << "Icon Count: " << lpIconGroup->idCount << endl;
- cout << "Type: " << lpIconGroup->idType << endl;
Advertisement
Add Comment
Please, Sign In to add comment