RpcSmSwapClientAllocFree

The RpcSmSwapClientAllocFree function exchanges the memory allocation and release mechanisms used by the client stubs with one supplied by the client.

#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcSmSwapClientAllocFree( 
  RPC_CLIENT_ALLOC  *  pfnAllocate,   
  RPC_CLIENT_FREE  *  pfnFree,        
  RPC_CLIENT_ALLOC **  pfnOldAllocate,   
  RPC_CLIENT_FREE  **  pfnOldFree     
);
 

Parameters

pfnAllocate
Specifies a new routine to allocate memory.
pfnFree
Specifies a new routine to release memory.
pfnOldAllocate
Returns the previous routine to allocate memory before the call to this routine.
pfnOldFree
Returns the previous routine to release memory before the call to this routine.

Remarks

The RpcSmSwapClientAllocFree routine exchanges the current memory allocation and memory freeing mechanisms with those supplied by the client.

Return Values

Value Meaning
RPC_S_OK Success
RPC_S_INVALID_ARG Invalid argument(s)

QuickInfo

  Windows NT: Yes
  Windows CE: Unsupported.
  Header: Declared in rpcndr.h.
  Import Library: Link with rpcrt4.lib.

See Also

RpcSmAllocate, RpcSmFree, RpcSmSetClientAllocFree