Share via


ICorDebugCode::GetCode Method

Gets all the code for the specified function, formatted for disassembly. This method has been deprecated in the .NET Framework version 2.0. Use ICorDebugCode2::GetCodeChunks instead.

HRESULT GetCode (
    [in] ULONG32     startOffset, 
    [in] ULONG32     endOffset,
    [in] ULONG32     cBufferAlloc,
    [out, size_is(cBufferAlloc),
        length_is(*pcBufferSize)] BYTE buffer[],
    [out] ULONG32    *pcBufferSize
);

Parameters

  • startOffset
    [in] The offset of the beginning of the function.

  • endOffset
    [in] The offset of the end of the function.

  • cBufferAlloc
    [in] The size of the buffer array into which the code will be returned.

  • buffer
    [out] The array into which the code will be returned.

  • pcBufferSize
    [out] The number of bytes returned.

Remarks

If the function's code has been divided into multiple chunks, they are concatenated in order of increasing native offset. Instruction boundaries are not checked.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: 1.1, 1.0

See Also

Reference

ICorDebugCode2::GetCodeChunks Method

ICorDebugCode Interface