SizeofResource Function
SizeofResource Function

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

Syntax

DWORD SizeofResource(      
    HMODULE hModule,     HRSRC hResInfo );

Parameters

hModule
[in] Handle to the module whose executable file contains the resource.
hResInfo
[in] Handle to the resource. This handle must be created by using the FindResource or FindResourceEx function.

Return Value

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.

Example

For an example, see Updating Resources.

Function Information

Minimum DLL Versionkernel32.dll
HeaderDeclared in Winbase.h, include Windows.h
Import libraryKernel32.lib
Minimum operating systems Windows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.

See Also

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View