Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>findresource()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FindResource()
Find a resource in a resource file
------------------------------------------------------------------------------

Syntax
FindResource( <hInst>, <cName> | <nId>, <cnType> )   -->  hResource

Arguments
<hInst> is the handle of the instance of the application (as
returned by the _GetInstance() function), or a handle of a DLL
(as returned by the LoadLibrary() function).  The default is the
current application.

<cName> is the name of a resource.

<nId> is a number identifying the resource to load.

<cnType> is either the name of the resource type, or one of
the pre-defined resource types (the RT_* values in WINDOWS.CH).

Returns
If successful, a handle identifying the resource is returned
as a non-zero number.  Otherwise, zero (0) is returned.

Description
This function can be used to find a resource in a resource
file (although you are unlikely ever to need to do this).

When the application has finished with the resource, it should
call the FreeResource() function.

Example
hResource = FindResource( hInst, "Accel", RT_ACCELERATOR )
hGlbRsrc = LoadResource( hInst, hResource )
// . . .
FreeResource( hGlbRsrc )


See Also: FreeResource() LoadResource()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson