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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpcndr.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

RpcSmAllocate
RpcSmGetThreadHandle
RpcSmSetThreadHandle
midl_user_allocate

 

 

Send comments about this topic to Microsoft

Build date: 11/23/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.