Kernel32FindResourceEx(IntPtr, String, IntPtr, UInt16) Method

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

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static IntPtr FindResourceEx(
	IntPtr hModule,
	string resourceType,
	IntPtr resourceId,
	ushort languageId
)

Parameters

hModule  IntPtr
A handle to the module whose portable executable file or an accompanying MUI file contains the resource.

If this parameter is , the function searches the module used to create the current process.

resourceType  String
The resource type.
resourceId  IntPtr
The integer identifier of the resource.
languageId  UInt16
The language identifier of the resource.

Return Value

IntPtr
If the function succeeds, the return value is a handle to the specified resource's information block. To obtain a handle to the resource, pass this handle to the LoadResource(SafeModuleHandle, IntPtr) function.

If the function fails, the return value is Zero.

To get extended error information, call GetLastWin32Error.

Remarks

See Also