SizeofResource

2.x

  DWORD SizeofResource(hinst, hrsrc)    
  HINSTANCE hinst; /* handle of module with resource */
  HRSRC hrsrc; /* handle of resource, */  

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

Parameters

hinst

Identifies the instance of the module whose executable file contains the resource.

hrsrc

Identifies the resource. This handle must have been created by using the FindResource 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 resource due to alignment. An application should not rely upon this value for the exact size of a resource.

See Also

AccessResource, FindResource