IDkmMemoryOperation.ReadMemory Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Read the memory of the target process.
public:
int ReadMemory(Microsoft::VisualStudio::Debugger::DkmProcess ^ process, System::UInt64 address, Microsoft::VisualStudio::Debugger::DkmReadMemoryFlags flags, cli::array <System::Byte> ^ buffer);
public int ReadMemory (Microsoft.VisualStudio.Debugger.DkmProcess process, ulong address, Microsoft.VisualStudio.Debugger.DkmReadMemoryFlags flags, byte[] buffer);
abstract member ReadMemory : Microsoft.VisualStudio.Debugger.DkmProcess * uint64 * Microsoft.VisualStudio.Debugger.DkmReadMemoryFlags * byte[] -> int
Public Function ReadMemory (process As DkmProcess, address As ULong, flags As DkmReadMemoryFlags, buffer As Byte()) As Integer
Parameters
- process
- DkmProcess
[In] DkmProcess represents a target process which is being debugged. The debugger debugs processes, so this is the basic unit of debugging. A DkmProcess can represent a system process or a virtual process such as minidumps.
- address
- UInt64
[In] The base address from which to read the target process's memory.
- flags
- DkmReadMemoryFlags
[In] Flags controlling the behavior of DkmProcess.ReadMemory and DkmProcess.ReadMemoryString.
- buffer
- Byte[]
[In,Out] A buffer that receives the contents from the address space of the target process. On failure, the content of this buffer is unspecified.
Returns
[Out] Indicates the number of bytes read from the target process. If DkmReadMemoryFlags.AllowPartialRead is clear, on success this value will always be exactly equal to the input size. If DkmReadMemoryFlags.AllowPartialRead is specified, on success, this value will be greater than zero.
Exceptions
E_INVALID_MEMORY_ADDRESS indicates that the address is not valid. See 'DkmReadMemoryFlags.AllowPartialRead' documentation for more information.