Muokkaa

Jaa


ICLRRuntimeInfo::LoadLibrary Method

Loads a .NET Framework library from the common language runtime (CLR) represented by an ICLRRuntimeInfo interface.

This method supersedes the LoadLibraryShim function.

Syntax

HRESULT LoadLibrary(  
     [in]  LPCWSTR pwzDllName,  
     [out, retval] HMODULE *phndModule);  

Parameters

pwzDllName
[in] The name of the assembly to be loaded.

phndModule
[out] A handle to the loaded assembly.

Return Value

This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.

HRESULT Description
S_OK The method completed successfully.
E_POINTER pwzDllName or phndModule is null.
E_OUTOFMEMORY Not enough memory is available to handle the request.

Remarks

This method only loads DLLs included in the .NET Framework redistributable package. It can not load user-generated assemblies.

Requirements

Platforms: See System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 4

See also