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

# NdrAllocate(3w)

## NAME

**NdrAllocate** (RPCRT4.@)

## SYNOPSIS

void \* NdrAllocate\
  (\
   MIDL\_STUB\_MESSAGE\* *pStubMsg*,\
   SIZE\_T             *len*\
  )

## DESCRIPTION

Allocates a block of memory using *pStubMsg-\>pfnAllocate*.

## PARAMS

*pStubMsg* **\[In/Out\]**  **MIDL\_STUB\_MESSAGE** structure.

*len* **\[In\]**  Size of memory block to allocate.

## RETURNS

The memory block of size *len* that was allocated.

## NOTES

The memory block is always **8**-byte aligned. If the function is unable to allocate memory an **ERROR\_OUTOFMEMORY** exception is raised.

## IMPLEMENTATION

Declared in **"rpcndr.h"**.

Implemented in **"dlls/rpcrt4/ndr\_marshall.c"**.

Debug channel **"ole"**.
