Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Marshal::GetHINSTANCE Method (Module^)

 

Returns the instance handle (HINSTANCE) for the specified module.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

public:
[SecurityCriticalAttribute]
static IntPtr GetHINSTANCE(
	Module^ m
)

Parameters

m
Type: System.Reflection::Module^

The module whose HINSTANCE is desired.

Return Value

Type: System::IntPtr

The HINSTANCE for m; or -1 if the module does not have an HINSTANCE.

Exception Condition
ArgumentNullException

The m parameter is null.

When dynamic or in-memory, modules do not have an HINSTANCE.

SecurityCriticalAttribute

requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft