[SHGetMalloc is available through Windows Vista and Windows Server 2003, but may be altered or unavailable in subsequent versions of the operating system or product. See the Remarks section for alternate recommendations.]
Retrieves a pointer to the Shell's IMalloc interface.
SHSTDAPI SHGetMalloc( IMalloc **ppMalloc );
The address of a pointer that receives the Shell's IMalloc interface pointer.
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
SHGetMalloc was introduced in Windows 95 and Microsoft Windows NT 4.0, but as of Windows 2000 it is no longer necessary. In its place, programs can call the equivalent (and easier to use) CoTaskMemAlloc and CoTaskMemFree. If you find an older reference document that suggests or even requires the use of SHGetMalloc, it is acceptable and encouraged to use CoTaskMemAlloc and CoTaskMemFree instead.
|Windows version||Windows XP [desktop apps only] Windows 2000 Server [desktop apps only]|
|Header||shlobj_core.h (include Shlobj.h)|
|DLL||Shell32.dll (version 4.0 or later)|