Kernel32FindResource(SafeModuleHandle, String, String) Method
Namespace: DevCase.Win32.NativeMethodsAssembly: 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 FindResource(
SafeModuleHandle hModule,
string resourceName,
string resourceType
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function FindResource (
hModule As SafeModuleHandle,
resourceName As String,
resourceType As String
) As IntPtr
Dim hModule As SafeModuleHandle
Dim resourceName As String
Dim resourceType As String
Dim returnValue As IntPtr
returnValue = Kernel32.FindResource(hModule,
resourceName, resourceType)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static IntPtr FindResource(
SafeModuleHandle^ hModule,
[InAttribute] String^ resourceName,
[InAttribute] String^ resourceType
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member FindResource :
hModule : SafeModuleHandle *
resourceName : string *
resourceType : string -> IntPtr
No code example is currently available or this language may not be supported.
- hModule SafeModuleHandle
-
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.
- resourceName String
-
The name of the resource.
Alternately, rather than a name, this parameter can the integer id. of the resource.
- resourceType String
-
The resource type.
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.