NdrOleAllocate function
The NdrOleAllocate function is used by RPC to allocate memory for an object interface. This function is a wrapper for the CoTaskMemAlloc function.
Syntax
RPCRTAPI void* RPC_ENTRY NdrOleAllocate(
_In_ size_t size
);
Parameters
- size [in]
-
Memory to allocate, in bytes.
Return value
Returns a void pointer to the allocated space upon success. Returns null upon failure due to insufficient memory.
Remarks
To return a pointer other than a void, use a type cast on the return value. The memory pointed to by the return value is guaranteed to be suitably aligned for the storage of any type of object. If the Size parameter is zero, NdrOleAllocate allocates a zero-length item in the heap and returns a valid pointer to that item. Always check the return value from NdrOleAllocate, even if the amount of memory requested is small.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also