DkmProcess.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.
Overloads
ReadMemory(UInt64, DkmReadMemoryFlags, Byte[]) |
Read the memory of the target process. |
ReadMemory(UInt64, DkmReadMemoryFlags, Void*, Int32) |
Read the memory of the target process. |
ReadMemory(UInt64, DkmReadMemoryFlags, Byte[])
Read the memory of the target process.
public:
int ReadMemory(System::UInt64 Address, Microsoft::VisualStudio::Debugger::DkmReadMemoryFlags Flags, cli::array <System::Byte> ^ Buffer);
public:
int ReadMemory(unsigned long long Address, Microsoft::VisualStudio::Debugger::DkmReadMemoryFlags Flags, Platform::Array <byte> ^ Buffer);
int ReadMemory(unsigned long Address, Microsoft::VisualStudio::Debugger::DkmReadMemoryFlags Flags, std::Array <byte> const & Buffer);
public int ReadMemory (ulong Address, Microsoft.VisualStudio.Debugger.DkmReadMemoryFlags Flags, byte[] Buffer);
member this.ReadMemory : uint64 * Microsoft.VisualStudio.Debugger.DkmReadMemoryFlags * byte[] -> int
Public Function ReadMemory (Address As ULong, Flags As DkmReadMemoryFlags, Buffer As Byte()) As Integer
Parameters
- 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.
Applies to
ReadMemory(UInt64, DkmReadMemoryFlags, Void*, Int32)
Read the memory of the target process.
public:
int ReadMemory(System::UInt64 Address, Microsoft::VisualStudio::Debugger::DkmReadMemoryFlags Flags, void* Buffer, int Size);
int ReadMemory(unsigned long Address, Microsoft::VisualStudio::Debugger::DkmReadMemoryFlags Flags, void* Buffer, int Size);
public int ReadMemory (ulong Address, Microsoft.VisualStudio.Debugger.DkmReadMemoryFlags Flags, void* Buffer, int Size);
member this.ReadMemory : uint64 * Microsoft.VisualStudio.Debugger.DkmReadMemoryFlags * nativeptr<unit> * int -> int
Parameters
- 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
- Void*
[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.
- Size
- Int32
[In] The number of bytes to be read from the process. In scenarios where the call is marshalled to the remote debugger from the IDE, this must be less than 25 MBs.
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.