Share via


IDebugProgram2::GetMemoryBytes

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

Retrieves the memory bytes occupied by the program.

Syntax

HRESULT GetMemoryBytes( 
   IDebugMemoryBytes2** ppMemoryBytes
);
int GetMemoryBytes( 
   out IDebugMemoryBytes2 ppMemoryBytes
);

Parameters

ppMemoryBytes
[out] Returns an IDebugMemoryBytes2 object that represents the memory bytes of the program.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

The memory bytes as represented by the IDebugMemoryBytes2 object is for the program's image in memory and not any memory that was allocated when the program was executed.

See also