SHGetMalloc


Retrieves a pointer to the shell's IMalloc interface.

HRESULT SHGetMalloc(

    LPMALLOC *ppMalloc

);

Parameters

ppMalloc
Address of a pointer that receives the shell's IMalloc interface pointer.

Return Values

Returns NOERROR if successful, or E_FAIL otherwise.

Remarks

This interface must be used to free memory that was allocated by the shell or to allocate memory that will be freed by the shell. Applications can also use this interface to allocate and free their own memory.

Requirements

  Version 4.00 and later of Shell32.dll

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in shlobj.h.
  Import Library: shell32.lib.