Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

RpcSmFree function

The RpcSmFree function releases memory allocated by RpcSmAllocate.

Syntax


RPC_STATUS RPC_ENTRY RpcSmFree(
  void *NodeToFree
);

Parameters

NodeToFree

Pointer to memory allocated by RpcSmAllocate or RpcSsAllocate.

Return value

The function RpcSmFree returns the following value.

ValueMeaning
RPC_S_OK

The call succeeded.

 

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

Remarks

Applications use RpcSmFree to free memory allocated by RpcSmAllocate. In cases where the stub allocates the memory for the application, RpcSmFree can also be used to release memory. For more information, see Memory Management.

To improve performance, the RpcSmFree function only marks memory for release. Memory is not actually released until your application calls the RpcSmDisableAllocate function. To release memory immediately, invoke the midl_user_free function.

Note that the handle of the thread calling RpcSmFree must match the handle of the thread that allocated the memory by calling RpcSmAllocate.. Use RpcSmGetThreadHandle and RpcSmSetThreadHandle to pass handles from thread to thread.

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

RpcSmAllocate
RpcSmGetThreadHandle
RpcSmSetThreadHandle
midl_user_allocate

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.