---
name: "SHGetMalloc"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/SHGetMalloc"
---

# SHGetMalloc(3w)

## NAME

**SHGetMalloc** (SHELL32.@)

## SYNOPSIS

HRESULT SHGetMalloc\
  (\
   LPMALLOC\* *lpmal*\
  )

## DESCRIPTION

Equivalent to CoGetMalloc(**MEMCTX\_TASK**, **...**). Under Windows(tm) 9x this function could use the shell32 built-in **"mini-COM"** without the need to load ole32.dll **-** see SHLoadOLE for details.

## PARAMS

*lpmal* **\[Out\]**  Destination for **IMalloc** interface.

## RETURNS

**Success:** **S\_OK**. *lpmal* contains the shells **IMalloc** interface. Failure. An **HRESULT** error code.

## SEE ALSO

CoGetMalloc, SHLoadOLE

## IMPLEMENTATION

Declared in **"shlobj.h"**.

Implemented in **"dlls/shell32/shellole.c"**.

Debug channel **"shell"**.
