Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CoGetMalloc function

Retrieves a pointer to the default OLE task memory allocator (which supports the system implementation of the IMalloc interface) so applications can call its methods to manage memory.

Syntax


HRESULT CoGetMalloc(
  _In_  DWORD    dwMemContext,
  _Out_ LPMALLOC *ppMalloc
);

Parameters

dwMemContext [in]

This parameter must be 1.

ppMalloc [out]

The address of an IMalloc* pointer variable that receives the interface pointer to the memory allocator.

Return value

This function can return the standard return values S_OK, E_INVALIDARG, and E_OUTOFMEMORY.

Remarks

The pointer to the IMalloc interface pointer received through the ppMalloc parameter cannot be used from a remote process; each process must have its own allocator.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

CoTaskMemAlloc
IMalloc

 

 

Show:
© 2017 Microsoft