다음을 통해 공유


IDebugDisassemblyStream2::Read

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Reads instructions starting from the current position in the disassembly stream.

Syntax

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 GetSize method.

The current position where the next instruction is read from can be changed by calling the 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.

See Also

IDebugDisassemblyStream2
DISASSEMBLY_STREAM_FIELDS
DisassemblyData
GetSize
Seek