The RpcSmSetClientAllocFree function enables the memory allocation and release mechanisms used by the client stubs.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcSmSetClientAllocFree(
RPC_CLIENT_ALLOC * pfnAllocate,
RPC_CLIENT_FREE * pfnFree
);
By overriding the default routines used by the client stub to manage memory, the RpcSmSetClientAllocFree routine 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 RpcSmFree and RpcSmAllocate.
Value | Meaning |
---|---|
RPC_S_OK | Success |
RPC_S_OUT_OF_MEMORY | Out of memory |
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpcndr.h.
Import Library: Link with rpcrt4.lib.