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
| Value | Meaning |
|---|---|
|
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.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/23/2012
