IDebugMemoryBytes2:: WriteAt

写入指定的字节数内存,开始在指定的地址。

HRESULT WriteAt( 
   IDebugMemoryContext2* pStartContext,
   DWORD                 dwCount,
   BYTE*                 rgbMemory
);
int WriteAt(
   IDebugMemoryContext2 pStartContext,
   uint                 dwCount,
   byte[]               rgbMemory
);

参数

  • pStartContext
    [in] 在指定位置开始编写字节的 IDebugMemoryContext2 对象。

  • dwCount
    [in] 字节数写入的。

  • rgbMemory
    [in] 写入的字节。 此数组的大小假定至少 dwCount 字节。

返回值

如果成功,则返回; S_OK否则,返回 S_FALSE ,如果并非所有的字节无法写入或返回错误代码 (通常 E_FAIL)。

备注

如果该起始地址不是在此 IDebugMemoryBytes2 对象表示的内存窗口中,编写不发生,但 E_FAIL 错误代码返回 ),即使编写的量重叠到内存空间。

请参见

参考

IDebugMemoryBytes2

IDebugMemoryContext2