|
CoGetMalloc
Retrieves the default OLE task memory allocator (a pointer to the system
implementation of the IMalloc interface) so applications can use it to manage memory.
HRESULT CoGetMalloc(
DWORD dwMemContext,
| //Indicates if memory is private or shared
| LPMALLOC * ppMalloc
| //Receives pointer to memory allocator on return
| );
|
|
Parameters
dwMemContext
Indicates this is reserved; the value must be 1.
ppMalloc
Receives a pointer to the memory allocator on return.
Return Values
S_OK
Indicates the allocator was retrieved successfully.
E_INVALIDARG
Indicates either dwMemContext is not equal to 1, or ppMalloc is an invalid out pointer.
E_OUTOFMEMORY
Inidcates pointer wasn't returned because the system is out of memory.
Comments
The pointer to the IMalloc interface pointer received through the ppMalloc parameter cannot be called from a remote process each process must have its own allocator.
See Also
IMalloc, CoTaskMemAlloc
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|