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

# CoGetMalloc(3w)

## NAME

**CoGetMalloc** (OLE32.@)

## SYNOPSIS

HRESULT CoGetMalloc\
  (\
   DWORD     *dwMemContext*,\
   LPMALLOC\* *lpMalloc*\
  )

## DESCRIPTION

Retrieves the current **IMalloc** interface for the process.

## PARAMS

*dwMemContext* **\[In\]**  **.**

*lpMalloc* **\[Out\]**  Address where memory allocator object will be stored.

## RETURNS

**Success:** **S\_OK**.

**Failure:** **HRESULT** code.

## IMPLEMENTATION

Declared in **"objbase.h"**.

Implemented in **"dlls/ole32/ifs.c"**.

Debug channel **"olemalloc"**.
