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

WTSFreeMemoryEx function

Frees memory that contains WTS_PROCESS_INFO_EX or WTS_SESSION_INFO_1 structures allocated by a Remote Desktop Services function.

Syntax


BOOL WINAPI WTSFreeMemoryEx(
  _In_  WTS_TYPE_CLASS WTSTypeClass,
  _In_  PVOID pMemory,
  _In_  ULONG NumberOfEntries
);

Parameters

WTSTypeClass [in]

A value of the WTS_TYPE_CLASS enumeration type that specifies the type of structures contained in the buffer referenced by the pMemory parameter.

pMemory [in]

A pointer to the buffer to free.

NumberOfEntries [in]

The number of elements in the buffer referenced by the pMemory parameter.

Return value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call the GetLastError function.

Remarks

Several Remote Desktop Services functions allocate buffers to return information. To free buffers that contain WTS_PROCESS_INFO_EX or WTS_SESSION_INFO_1 structures, you must call the WTSFreeMemoryEx function. To free other buffers, you can call either the WTSFreeMemory function or the WTSFreeMemoryEx function.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Header

Wtsapi32.h

Library

Wtsapi32.lib

DLL

Wtsapi32.dll

Unicode and ANSI names

WTSFreeMemoryExW (Unicode) and WTSFreeMemoryExA (ANSI)

See also

WTSEnumerateProcesses
WTSEnumerateProcessesEx
WTSEnumerateSessions
WTSFreeMemory
WTSQuerySessionInformation
WTSQueryUserConfig
WTS_PROCESS_INFO_EX
WTS_SESSION_INFO_1

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.