Click or drag to resize

FreeMemory

Free memory previously allocated using AllocateMemory.

virtual HRESULT FreeMemory(UINT64 ullOffset) abstract;
Parameters
ullOffset

[in] Offset into device memory region where memory was previouly allocated using AllocateMemory.

Return Value

Returns S_OK if successful, otherwise a failure HRESULT.

Example

The following example demonstrates use of the FreeMemory function.

C++
// CoAcme4321.cpp
STDMETHODIMP Acme4321::IAcme4321_Configure()
{
  UINT64 ullOffset;
  hr = io.Memory.AllocateMemory(100, &ullOffset);

  // ...

  hr = io.Memory.FreeMemory(ulOffset);

  return hr;
}

Download a complete CHM version of this documentation here.