I am trying to get string resource length with FindResource
/SizeofResource
functions.
I make call like this:
HRSRC hResInfo = FindResource(hModule, MAKEINTRESOURCE(resourceId), RT_STRING);
I receive NULL
and GetLastError
returns ERROR_RESOURCE_NAME_NOT_FOUND
.
Now I use the same variables to make following call:
LoadString(hModule, resourceId, buffer, 4096)
And string is loaded successfully with the same hModule
and resourceId
.
So, I can load string resource, but can not find it with FindResource
.
What may be the reason? How to find string resource with FindResource
(and hence get its size)?