SizeofResource

  DWORD SizeofResource(hModule, hrsrc)    
  HANDLE hModule; /* handle of module with resource */
  HRSRC hrsrc; /* handle of resource */

The SizeofResource function returns the size, in bytes, of the given resource.

Parameters

hModule

Identifies the module whose executable file contains the resource.

hrsrc

Identifies the resource. This handle must have been created by using the FindResource or FindResourceEx function.

Return Value

The return value specifies the number of bytes in the resource, if the function is successful. It is zero if the resource cannot be found.

Comments

The value returned may be larger than the actual resource due to alignment. An application should not rely upon this value for the exact size of a resource.

See Also

AccessResource, FindResource, FindResourceEx