Export (0) Print
Expand All
Expand Minimize

RpcSsSetClientAllocFree function

The RpcSsSetClientAllocFree function enables the memory allocation and release mechanisms used by the client stubs.

Syntax


void RPC_ENTRY RpcSsSetClientAllocFree(
  RPC_CLIENT_ALLOC *pfnAllocate,
  RPC_CLIENT_FREE *pfnFree
);

Parameters

pfnAllocate

Memory-allocation function.

pfnFree

Memory-releasing function used with the memory-allocation function specified by pfnAllocate.

Return value

ValueMeaning
RPC_S_OUT_OF_MEMORY

The system is out of memory.

 

Note  For a list of valid error codes, see RPC Return Values.

Remarks

By overriding the default routines used by the client stub to manage memory, RpcSsSetClientAllocFree establishes the memory allocation and memory freeing mechanisms. Note that the default routines are free and malloc, unless the remote call occurs within manager code. In this case, the default memory–management routines are RpcSsFree and RpcSsAllocate.

Note that when RpcSsSetClientAllocFree reclaims the memory resources, it also makes the context handle NULL.

Note  RpcSsSetClientAllocFree raises exceptions, unlike RpcSmSetClientAllocFree, which returns the error code.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Rpcndr.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

RpcSmSetClientAllocFree
RpcSsAllocate
RpcSsFree

 

 

Community Additions

ADD
Show:
© 2014 Microsoft