SizeofResource function

Retrieves the size, in bytes, of the specified resource.

Syntax

DWORD SizeofResource(
  HMODULE hModule,
  HRSRC   hResInfo
);

Parameters

hModule

Type: HMODULE

A handle to the module whose executable file contains the resource.

hResInfo

Type: HRSRC

A handle to the resource. This handle must be created by using the FindResource or FindResourceEx function.

Return Value

Type: DWORD

If the function succeeds, the return value is the number of bytes in the resource.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header libloaderapi.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See Also

Conceptual

FindResource

FindResourceEx

Reference

Resources