ICLRDebugging::CanUnloadNow Method

Determines whether a library that was provided by an ICLRDebuggingLibraryProvider interface is still in use or can be unloaded.

Syntax

HRESULT CanUnloadNow(HMODULE hModule);

Parameters

hmodule [in] The base address of a module in the target process.

Return Value

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

HRESULT Description
S_OK The module that is referenced by hmodule can be unloaded.
S_FALSE The module that is referenced by hmodule is still in use.
COR_E_NOT_CLR The indicated module is not a CLR module.

Exceptions

Remarks

This method checks to see if all instances of ICorDebug* interfaces have been released and no thread is currently within a call to the ICLRDebugging::OpenVirtualProcess method.

Requirements

Platforms: See System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: Available since 4

See also