
Functionįor example, an application can use the LoadIcon function to load an icon for display on the screen. To use a resource immediately, an application should use one of the following resource-specific functions to find the resource and convert the data into a more usable form. To reduce the amount of memory required for a resource, an application should refer to it by integer identifier instead of by name.Īn application can use FindResource to find any type of resource, but this function should be used only if the application must access the binary resource data by making subsequent calls to LoadResource and then to LockResource. For example, the string "#258" represents the integer identifier 258. If the first character of the string is a pound sign (#), the remaining characters represent a decimal number that specifies the integer identifier of the resource's name or type. Otherwise, those parameters are long pointers to null-terminated strings. If IS_INTRESOURCE is TRUE for x = lpName or lpType, x specifies the integer identifier of the name or type of the given resource. To get extended error information, call GetLastError. If the function fails, the return value is NULL. To obtain a handle to the resource, pass this handle to the LoadResource function. If the function succeeds, the return value is a handle to the specified resource's information block. For more information, see the Remarks section below. For standard resource types, see Resource Types. Alternately, rather than a pointer, this parameter can be MAKEINTRESOURCE(ID), where ID is the integer identifier of the given resource type. Alternately, rather than a pointer, this parameter can be MAKEINTRESOURCE(ID), where ID is the integer identifier of the resource.

If this parameter is NULL, the function searches the module used to create the current process.
Purebasic integer portable#
Syntax HRSRC FindResourceA(Ī handle to the module whose portable executable file or an accompanying MUI file contains the resource. To specify a language, use the FindResourceEx function.

Determines the location of a resource with the specified type and name in the specified module.
