This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2019. Download it here
Writes the specified number of bytes of memory, starting at the specified address.
HRESULT WriteAt( IDebugMemoryContext2* pStartContext, DWORD dwCount, BYTE* rgbMemory );
int WriteAt( IDebugMemoryContext2 pStartContext, uint dwCount, byte rgbMemory );
[in] The IDebugMemoryContext2 object that specifies where to start writing bytes.
[in] The number of bytes to write.
[in] The bytes to write. This array is assumed to be at least
dwCount bytes in size.
If successful, returns
S_OK; otherwise, returns
S_FALSE if not all bytes could be written or returns an error code (typically
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.