次の方法で共有


IDebugMemoryBytes2::WriteAt

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. 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

Writes the specified number of bytes of memory, starting at the specified address.

Syntax

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

Parameters

pStartContext
[in] The IDebugMemoryContext2 object that specifies where to start writing bytes.

dwCount
[in] The number of bytes to write.

rgbMemory
[in] The bytes to write. This array is assumed to be at least dwCount bytes in size.

Return Value

If successful, returns S_OK; otherwise, returns S_FALSE if not all bytes could be written or returns an error code (typically E_FAIL).

Remarks

If the starting address is not within the memory window represented by this IDebugMemoryBytes2 object, no writing occurs and an error code of E_FAIL is returned — even if the amount to write overlaps into the memory space.

See also