RpcSmSetClientAllocFree
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 |
|
); |
|
Parameters
pfnAllocate
Specifies the
routine used to allocate memory.
pfnFree
Specifies the
routine used to release memory and used with the routine specified by pfnAllocate.
Remarks
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.
Return Values
Value |
Meaning |
RPC_S_OK |
Success |
RPC_S_OUT_OF_MEMORY |
Out of
memory |
See Also