IDebugDisassemblyStream2::Read
Reads instructions starting from the current position in the disassembly stream.
HRESULT Read(
DWORD dwInstructions,
DISASSEMBLY_STREAM_FIELDS dwFields,
DWORD* pdwInstructionsRead,
DisassemblyData* prgDisassembly
);
int Read(
uint dwInstructions,
enum_DISASSEMBLY_STREAM_FIELDS dwFields,
out uint pdwInstructionsRead,
DisassemblyData[] prgDisassembly
);
Parameters
dwInstructions
[in] The number of instructions to disassemble. This value is also the maximum length of the prgDisassembly array.dwFields
[in] A combination of flags from the DISASSEMBLY_STREAM_FIELDS enumeration that indicate which fields of prgDisassembly are to be filled out.pdwInstructionsRead
[out] Returns the number of instructions actually disassembled.prgDisassembly
[out] An array of DisassemblyData structures that is filled in with the disassembled code, one structure per disassembled instruction. The length of this array is dictated by the dwInstructions parameter.
Return Value
If successful, returns S_OK; otherwise, returns an error code.
Remarks
The maximum number of instructions that are available in the current scope can be obtained by calling the IDebugDisassemblyStream2::GetSize method.
The current position where the next instruction is read from can be changed by calling the IDebugDisassemblyStream2::Seek method.
The DSF_OPERANDS_SYMBOLS flag can be added to the DSF_OPERANDS flag in the dwFields parameter to indicate that symbol names should be used when disassembling instructions.