Table of Contents

Method OpenVirtualProcess

Namespace
Microsoft.Samples.Debugging.CorDebug
Assembly
corapi.dll

OpenVirtualProcess(ulong, object, ICLRDebuggingLibraryProvider, ref ClrDebuggingVersion, ref Guid, out object, ref ClrDebuggingVersion, out ClrDebuggingProcessFlags)

Detects if a native module represents a CLR and if so provides the debugging interface and versioning information

int OpenVirtualProcess(ulong moduleBaseAddress, object dataTarget, ICLRDebuggingLibraryProvider libraryProvider, ref ClrDebuggingVersion maxDebuggerSupportedVersion, ref Guid riidProcess, out object process, ref ClrDebuggingVersion version, out ClrDebuggingProcessFlags flags)

Parameters

moduleBaseAddress ulong

The native base address of a module which might be a CLR

dataTarget object

The process abstraction which can be used for inspection

libraryProvider ICLRDebuggingLibraryProvider

A callback interface for locating version specific debug libraries such as mscordbi.dll and mscordacwks.dll

maxDebuggerSupportedVersion ClrDebuggingVersion

The highest version of the CLR/debugging libraries which the caller can support

riidProcess Guid
process object

The CLR's debugging interface or null if no debugger was detected

version ClrDebuggingVersion

The version of the CLR detected or null if no CLR was detected

flags ClrDebuggingProcessFlags

Flags which have additional information about the CLR. See ClrDebuggingProcessFlags for more details

Returns

int

HResults.S_OK if an appropriate version CLR was detected, otherwise an appropriate error hresult