FindResource

Locate a resource and return a handle to it.

Declaration

Source position: resh.inc line 70

  function FindResource(ModuleHandle: TFPResourceHMODULE; 
                       ResourceName: PChar; ResourceType: PChar)
                        : TFPResourceHandle;
  function FindResource(ModuleHandle: TFPResourceHMODULE; 
                       const ResourceName: AnsiString; 
                       const ResourceType: AnsiString) : TFPResourceHandle;
  function FindResource(ModuleHandle: TFPResourceHMODULE; 
                       const ResourceName: AnsiString; 
                       ResourceType: PChar) : TFPResourceHandle;
  function FindResource(ModuleHandle: TFPResourceHMODULE; 
                       ResourceName: PChar; 
                       const ResourceType: AnsiString) : TFPResourceHandle;

Description

FindResource searches for a resource with name ResourceName and of type ResourceType in the executable or library identified by ModuleHandle. It returns a TResourceHandle which can be used to load the resource with LoadResource .

Errors

None. In case the resource was not found, 0 is returned.

See also

Name Description
FreeResource Free a loaded resource
FreeResource Free a loaded resource
LoadResource Load a resource for use
LockResource Lock a resource
SizeofResource Return the size of a particular resource
UnlockResource Unlock a previously locked resource