SizeofResource

Syntax

WORD SizeofResource(hInstance,hResInfo)

This function supplies the size (in bytes) of the specified resource. It is typically used with the AccessResource function to prepare memory to receive a resource from the file.

Parameter Type/Description  

hInstance HANDLE Identifies the instance of the module whose executable file contains the resource.  
hResInfo HANDLE Identifies the desired resource. This handle is assumed to have been created by using the FindResource function.  

Return Value

The return value specifies the number of bytes in the resource. 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.