ICLRDataTarget Interface
Provides methods for interaction with a target item of the common language runtime (CLR).
interface ICLRDataTarget : IUnknown {
HRESULT GetCurrentThreadID (
[out] ULONG32 *threadID
);
HRESULT GetImageBase (
[in, string] LPCWSTR imagePath,
[out] CLRDATA_ADDRESS *baseAddress
);
HRESULT GetMachineType (
[out] ULONG32 *machineType
);
HRESULT GetPointerSize (
[out] ULONG32 *pointerSize
);
HRESULT GetThreadContext (
[in] ULONG32 threadID,
[in] ULONG32 contextFlags,
[in] ULONG32 contextSize,
[out, size_is(contextSize)]
BYTE *context
);
HRESULT GetTLSValue (
[in] ULONG32 threadID,
[in] ULONG32 index,
[out] CLRDATA_ADDRESS *value
);
HRESULT ReadVirtual (
[in] CLRDATA_ADDRESS address,
[out, size_is(bytesRequested), length_is(*bytesRead)]
BYTE *buffer,
[in] ULONG32 bytesRequested,
[out] ULONG32 *bytesRead
);
HRESULT Request (
[in] ULONG32 reqCode,
[in] ULONG32 inBufferSize,
[in, size_is(inBufferSize)]
BYTE *inBuffer,
[in] ULONG32 outBufferSize,
[out, size_is(outBufferSize)]
BYTE *outBuffer
);
HRESULT SetThreadContext (
[in] ULONG32 threadID,
[in] ULONG32 contextSize,
[in, size_is(contextSize)]
BYTE *context
);
HRESULT SetTLSValue (
[in] ULONG32 threadID,
[in] ULONG32 index,
[in] CLRDATA_ADDRESS value
);
HRESULT WriteVirtual (
[in] CLRDATA_ADDRESS address,
[in, size_is(bytesRequested)]
BYTE *buffer,
[in] ULONG32 bytesRequested,
[out] ULONG32 *bytesWritten
);
};
Methods
Method |
Description |
---|---|
Gets the operating system identifier for the current thread. |
|
Gets the base memory address for the specified image. |
|
Gets an identifier for the kind of instruction set that the target process is using. |
|
Gets the size, in bytes, of a pointer to the current target. |
|
Gets a pointer to the context of the thread with the specified identifier. |
|
Gets a value in thread local storage (TLS) at the specified index for the specified thread. |
|
Reads data from the specified virtual memory address into the specified buffer. |
|
Called by the common language runtime (CLR) data access services to request an operation, as defined by the implementation. |
|
Sets the current context of the specified thread in the target process. |
|
Sets a value in the thread local storage (TLS) of the specified thread in the target process. |
|
Writes data from the specified buffer to the specified virtual memory address. |
Remarks
The API client (that is, the debugger) must implement this interface as appropriate for the particular target item. For example, a live process would have an implementation different from that of a memory dump.
Requirements
Platforms: Windows 2000, Windows XP, Windows Server 2003 family
Header: ClrData.idl
Library: CorGuids.lib
.NET Framework Version: 2.0