Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

731 lines
20 KiB

  1. /*********************************************************************
  2. *
  3. * WTSAPI32.H
  4. *
  5. * Windows Terminal Server public APIs
  6. *
  7. * Copyright (c) 1997-2001 Microsoft Corporation
  8. *
  9. **********************************************************************/
  10. #ifndef _INC_WTSAPI
  11. #define _INC_WTSAPI
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /*===================================================================
  19. == Defines
  20. =====================================================================*/
  21. /*
  22. * Specifies the current server
  23. */
  24. #define WTS_CURRENT_SERVER ((HANDLE)NULL)
  25. #define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL)
  26. #define WTS_CURRENT_SERVER_NAME (NULL)
  27. /*
  28. * Specifies the current session (SessionId)
  29. */
  30. #define WTS_CURRENT_SESSION ((DWORD)-1)
  31. /*
  32. * Possible pResponse values from WTSSendMessage()
  33. */
  34. #ifndef IDTIMEOUT
  35. #define IDTIMEOUT 32000
  36. #endif
  37. #ifndef IDASYNC
  38. #define IDASYNC 32001
  39. #endif
  40. /*
  41. * Shutdown flags
  42. */
  43. #define WTS_WSD_LOGOFF 0x00000001 // log off all users except
  44. // current user; deletes
  45. // WinStations (a reboot is
  46. // required to recreate the
  47. // WinStations)
  48. #define WTS_WSD_SHUTDOWN 0x00000002 // shutdown system
  49. #define WTS_WSD_REBOOT 0x00000004 // shutdown and reboot
  50. #define WTS_WSD_POWEROFF 0x00000008 // shutdown and power off (on
  51. // machines that support power
  52. // off through software)
  53. #define WTS_WSD_FASTREBOOT 0x00000010 // reboot without logging users
  54. // off or shutting down
  55. /*===================================================================
  56. == WTS_CONNECTSTATE_CLASS - Session connect state
  57. =====================================================================*/
  58. typedef enum _WTS_CONNECTSTATE_CLASS {
  59. WTSActive, // User logged on to WinStation
  60. WTSConnected, // WinStation connected to client
  61. WTSConnectQuery, // In the process of connecting to client
  62. WTSShadow, // Shadowing another WinStation
  63. WTSDisconnected, // WinStation logged on without client
  64. WTSIdle, // Waiting for client to connect
  65. WTSListen, // WinStation is listening for connection
  66. WTSReset, // WinStation is being reset
  67. WTSDown, // WinStation is down due to error
  68. WTSInit, // WinStation in initialization
  69. } WTS_CONNECTSTATE_CLASS;
  70. /*=====================================================================
  71. == WTS_SERVER_INFO - returned by WTSEnumerateServers (version 1)
  72. =====================================================================*/
  73. /*
  74. * WTSEnumerateServers() returns two variables: pServerInfo and Count.
  75. * The latter is the number of WTS_SERVER_INFO structures contained in
  76. * the former. In order to read each server, iterate i from 0 to
  77. * Count-1 and reference the server name as
  78. * pServerInfo[i].pServerName; for example:
  79. *
  80. * for ( i=0; i < Count; i++ ) {
  81. * _tprintf( TEXT("%s "), pServerInfo[i].pServerName );
  82. * }
  83. *
  84. * The memory returned looks like the following. P is a pServerInfo
  85. * pointer, and D is the string data for that pServerInfo:
  86. *
  87. * P1 P2 P3 P4 ... Pn D1 D2 D3 D4 ... Dn
  88. *
  89. * This makes it easier to iterate the servers, using code similar to
  90. * the above.
  91. */
  92. typedef struct _WTS_SERVER_INFOW {
  93. LPWSTR pServerName; // server name
  94. } WTS_SERVER_INFOW, * PWTS_SERVER_INFOW;
  95. typedef struct _WTS_SERVER_INFOA {
  96. LPSTR pServerName; // server name
  97. } WTS_SERVER_INFOA, * PWTS_SERVER_INFOA;
  98. #ifdef UNICODE
  99. #define WTS_SERVER_INFO WTS_SERVER_INFOW
  100. #define PWTS_SERVER_INFO PWTS_SERVER_INFOW
  101. #else
  102. #define WTS_SERVER_INFO WTS_SERVER_INFOA
  103. #define PWTS_SERVER_INFO PWTS_SERVER_INFOA
  104. #endif
  105. /*=====================================================================
  106. == WTS_SESSION_INFO - returned by WTSEnumerateSessions (version 1)
  107. =====================================================================*/
  108. /*
  109. * WTSEnumerateSessions() returns data in a similar format to the above
  110. * WTSEnumerateServers(). It returns two variables: pSessionInfo and
  111. * Count. The latter is the number of WTS_SESSION_INFO structures
  112. * contained in the former. Iteration is similar, except that there
  113. * are three parts to each entry, so it would look like this:
  114. *
  115. * for ( i=0; i < Count; i++ ) {
  116. * _tprintf( TEXT("%-5u %-20s %u\n"),
  117. pSessionInfo[i].SessionId,
  118. * pSessionInfo[i].pWinStationName,
  119. * pSessionInfo[i].State );
  120. * }
  121. *
  122. * The memory returned is also segmented as the above, with all the
  123. * structures allocated at the start and the string data at the end.
  124. * We'll use S for the SessionId, P for the pWinStationName pointer
  125. * and D for the string data, and C for the connect State:
  126. *
  127. * S1 P1 C1 S2 P2 C2 S3 P3 C3 S4 P4 C4 ... Sn Pn Cn D1 D2 D3 D4 ... Dn
  128. *
  129. * As above, this makes it easier to iterate the sessions.
  130. */
  131. typedef struct _WTS_SESSION_INFOW {
  132. DWORD SessionId; // session id
  133. LPWSTR pWinStationName; // name of WinStation this session is
  134. // connected to
  135. WTS_CONNECTSTATE_CLASS State; // connection state (see enum)
  136. } WTS_SESSION_INFOW, * PWTS_SESSION_INFOW;
  137. typedef struct _WTS_SESSION_INFOA {
  138. DWORD SessionId; // session id
  139. LPSTR pWinStationName; // name of WinStation this session is
  140. // connected to
  141. WTS_CONNECTSTATE_CLASS State; // connection state (see enum)
  142. } WTS_SESSION_INFOA, * PWTS_SESSION_INFOA;
  143. #ifdef UNICODE
  144. #define WTS_SESSION_INFO WTS_SESSION_INFOW
  145. #define PWTS_SESSION_INFO PWTS_SESSION_INFOW
  146. #else
  147. #define WTS_SESSION_INFO WTS_SESSION_INFOA
  148. #define PWTS_SESSION_INFO PWTS_SESSION_INFOA
  149. #endif
  150. /*=====================================================================
  151. == WTS_PROCESS_INFO - returned by WTSEnumerateProcesses (version 1)
  152. =====================================================================*/
  153. /*
  154. * WTSEnumerateProcesses() also returns data similar to
  155. * WTSEnumerateServers(). It returns two variables: pProcessInfo and
  156. * Count. The latter is the number of WTS_PROCESS_INFO structures
  157. * contained in the former. Iteration is similar, except that there
  158. * are four parts to each entry, so it would look like this:
  159. *
  160. * for ( i=0; i < Count; i++ ) {
  161. * GetUserNameFromSid( pProcessInfo[i].pUserSid, UserName,
  162. * sizeof(UserName) );
  163. * _tprintf( TEXT("%-5u %-20s %-5u %s\n"),
  164. * pProcessInfo[i].SessionId,
  165. * UserName,
  166. * pProcessInfo[i].ProcessId,
  167. * pProcessInfo[i].pProcessName );
  168. * }
  169. *
  170. * The memory returned is also segmented as the above, with all the
  171. * structures allocated at the start and the string data at the end.
  172. * We'll use S for the SessionId, R for the ProcessId, P for the
  173. * pProcessName pointer and D for the string data, and U for pUserSid:
  174. *
  175. * S1 R1 P1 U1 S2 R2 P2 U2 S3 R3 P3 U3 ... Sn Rn Pn Un D1 D2 D3 ... Dn
  176. *
  177. * As above, this makes it easier to iterate the processes.
  178. */
  179. typedef struct _WTS_PROCESS_INFOW {
  180. DWORD SessionId; // session id
  181. DWORD ProcessId; // process id
  182. LPWSTR pProcessName; // name of process
  183. PSID pUserSid; // user's SID
  184. } WTS_PROCESS_INFOW, * PWTS_PROCESS_INFOW;
  185. typedef struct _WTS_PROCESS_INFOA {
  186. DWORD SessionId; // session id
  187. DWORD ProcessId; // process id
  188. LPSTR pProcessName; // name of process
  189. PSID pUserSid; // user's SID
  190. } WTS_PROCESS_INFOA, * PWTS_PROCESS_INFOA;
  191. #ifdef UNICODE
  192. #define WTS_PROCESS_INFO WTS_PROCESS_INFOW
  193. #define PWTS_PROCESS_INFO PWTS_PROCESS_INFOW
  194. #else
  195. #define WTS_PROCESS_INFO WTS_PROCESS_INFOA
  196. #define PWTS_PROCESS_INFO PWTS_PROCESS_INFOA
  197. #endif
  198. /*=====================================================================
  199. == WTS_INFO_CLASS - WTSQuerySessionInformation
  200. == (See additional typedefs for more info on structures)
  201. =====================================================================*/
  202. #define WTS_PROTOCOL_TYPE_CONSOLE 0 // Console
  203. #define WTS_PROTOCOL_TYPE_ICA 1 // ICA Protocol
  204. #define WTS_PROTOCOL_TYPE_RDP 2 // RDP Protocol
  205. typedef enum _WTS_INFO_CLASS {
  206. WTSInitialProgram,
  207. WTSApplicationName,
  208. WTSWorkingDirectory,
  209. WTSOEMId,
  210. WTSSessionId,
  211. WTSUserName,
  212. WTSWinStationName,
  213. WTSDomainName,
  214. WTSConnectState,
  215. WTSClientBuildNumber,
  216. WTSClientName,
  217. WTSClientDirectory,
  218. WTSClientProductId,
  219. WTSClientHardwareId,
  220. WTSClientAddress,
  221. WTSClientDisplay,
  222. WTSClientProtocolType,
  223. } WTS_INFO_CLASS;
  224. /*=====================================================================
  225. == WTSQuerySessionInformation - (WTSClientAddress)
  226. =====================================================================*/
  227. typedef struct _WTS_CLIENT_ADDRESS {
  228. DWORD AddressFamily; // AF_INET, AF_IPX, AF_NETBIOS, AF_UNSPEC
  229. BYTE Address[20]; // client network address
  230. } WTS_CLIENT_ADDRESS, * PWTS_CLIENT_ADDRESS;
  231. /*=====================================================================
  232. == WTSQuerySessionInformation - (WTSClientDisplay)
  233. =====================================================================*/
  234. typedef struct _WTS_CLIENT_DISPLAY {
  235. DWORD HorizontalResolution; // horizontal dimensions, in pixels
  236. DWORD VerticalResolution; // vertical dimensions, in pixels
  237. DWORD ColorDepth; // 1=16, 2=256, 4=64K, 8=16M
  238. } WTS_CLIENT_DISPLAY, * PWTS_CLIENT_DISPLAY;
  239. /*=====================================================================
  240. == WTS_CONFIG_CLASS - WTSQueryUserConfig/WTSSetUserConfig
  241. =====================================================================*/
  242. typedef enum _WTS_CONFIG_CLASS {
  243. //Initial program settings
  244. WTSUserConfigInitialProgram, // string returned/expected
  245. WTSUserConfigWorkingDirectory, // string returned/expected
  246. WTSUserConfigfInheritInitialProgram, // DWORD returned/expected
  247. //
  248. WTSUserConfigfAllowLogonTerminalServer, //DWORD returned/expected
  249. //Timeout settings
  250. WTSUserConfigTimeoutSettingsConnections, //DWORD returned/expected
  251. WTSUserConfigTimeoutSettingsDisconnections, //DWORD returned/expected
  252. WTSUserConfigTimeoutSettingsIdle, //DWORD returned/expected
  253. //Client device settings
  254. WTSUserConfigfDeviceClientDrives, //DWORD returned/expected
  255. WTSUserConfigfDeviceClientPrinters, //DWORD returned/expected
  256. WTSUserConfigfDeviceClientDefaultPrinter, //DWORD returned/expected
  257. //Connection settings
  258. WTSUserConfigBrokenTimeoutSettings, //DWORD returned/expected
  259. WTSUserConfigReconnectSettings, //DWORD returned/expected
  260. //Modem settings
  261. WTSUserConfigModemCallbackSettings, //DWORD returned/expected
  262. WTSUserConfigModemCallbackPhoneNumber, // string returned/expected
  263. //Shadow settings
  264. WTSUserConfigShadowingSettings, //DWORD returned/expected
  265. //User Profile settings
  266. WTSUserConfigTerminalServerProfilePath, // string returned/expected
  267. //Terminal Server home directory
  268. WTSUserConfigTerminalServerHomeDir, // string returned/expected
  269. WTSUserConfigTerminalServerHomeDirDrive, // string returned/expected
  270. WTSUserConfigfTerminalServerRemoteHomeDir, // DWORD 0:LOCAL 1:REMOTE
  271. } WTS_CONFIG_CLASS;
  272. /*=====================================================================
  273. == WTS_EVENT - Event flags for WTSWaitSystemEvent
  274. =====================================================================*/
  275. #define WTS_EVENT_NONE 0x00000000 // return no event
  276. #define WTS_EVENT_CREATE 0x00000001 // new WinStation created
  277. #define WTS_EVENT_DELETE 0x00000002 // existing WinStation deleted
  278. #define WTS_EVENT_RENAME 0x00000004 // existing WinStation renamed
  279. #define WTS_EVENT_CONNECT 0x00000008 // WinStation connect to client
  280. #define WTS_EVENT_DISCONNECT 0x00000010 // WinStation logged on without
  281. // client
  282. #define WTS_EVENT_LOGON 0x00000020 // user logged on to existing
  283. // WinStation
  284. #define WTS_EVENT_LOGOFF 0x00000040 // user logged off from
  285. // existing WinStation
  286. #define WTS_EVENT_STATECHANGE 0x00000080 // WinStation state change
  287. #define WTS_EVENT_LICENSE 0x00000100 // license state change
  288. #define WTS_EVENT_ALL 0x7fffffff // wait for all event types
  289. #define WTS_EVENT_FLUSH 0x80000000 // unblock all waiters
  290. /*=====================================================================
  291. == WTS_VIRTUAL_CLASS - WTSVirtualChannelQuery
  292. =====================================================================*/
  293. typedef enum _WTS_VIRTUAL_CLASS {
  294. WTSVirtualClientData, // Virtual channel client module data
  295. // (C2H data)
  296. WTSVirtualFileHandle
  297. } WTS_VIRTUAL_CLASS;
  298. /*=====================================================================
  299. == Windows Terminal Server public APIs
  300. =====================================================================*/
  301. BOOL
  302. WINAPI
  303. WTSEnumerateServersW(
  304. IN LPWSTR pDomainName,
  305. IN DWORD Reserved,
  306. IN DWORD Version,
  307. OUT PWTS_SERVER_INFOW * ppServerInfo,
  308. OUT DWORD * pCount
  309. );
  310. BOOL
  311. WINAPI
  312. WTSEnumerateServersA(
  313. IN LPSTR pDomainName,
  314. IN DWORD Reserved,
  315. IN DWORD Version,
  316. OUT PWTS_SERVER_INFOA * ppServerInfo,
  317. OUT DWORD * pCount
  318. );
  319. #ifdef UNICODE
  320. #define WTSEnumerateServers WTSEnumerateServersW
  321. #else
  322. #define WTSEnumerateServers WTSEnumerateServersA
  323. #endif
  324. /*------------------------------------------------*/
  325. HANDLE
  326. WINAPI
  327. WTSOpenServerW(
  328. IN LPWSTR pServerName
  329. );
  330. HANDLE
  331. WINAPI
  332. WTSOpenServerA(
  333. IN LPSTR pServerName
  334. );
  335. #ifdef UNICODE
  336. #define WTSOpenServer WTSOpenServerW
  337. #else
  338. #define WTSOpenServer WTSOpenServerA
  339. #endif
  340. /*------------------------------------------------*/
  341. VOID
  342. WINAPI
  343. WTSCloseServer(
  344. IN HANDLE hServer
  345. );
  346. /*------------------------------------------------*/
  347. BOOL
  348. WINAPI
  349. WTSEnumerateSessionsW(
  350. IN HANDLE hServer,
  351. IN DWORD Reserved,
  352. IN DWORD Version,
  353. OUT PWTS_SESSION_INFOW * ppSessionInfo,
  354. OUT DWORD * pCount
  355. );
  356. BOOL
  357. WINAPI
  358. WTSEnumerateSessionsA(
  359. IN HANDLE hServer,
  360. IN DWORD Reserved,
  361. IN DWORD Version,
  362. OUT PWTS_SESSION_INFOA * ppSessionInfo,
  363. OUT DWORD * pCount
  364. );
  365. #ifdef UNICODE
  366. #define WTSEnumerateSessions WTSEnumerateSessionsW
  367. #else
  368. #define WTSEnumerateSessions WTSEnumerateSessionsA
  369. #endif
  370. /*------------------------------------------------*/
  371. BOOL
  372. WINAPI
  373. WTSEnumerateProcessesW(
  374. IN HANDLE hServer,
  375. IN DWORD Reserved,
  376. IN DWORD Version,
  377. OUT PWTS_PROCESS_INFOW * ppProcessInfo,
  378. OUT DWORD * pCount
  379. );
  380. BOOL
  381. WINAPI
  382. WTSEnumerateProcessesA(
  383. IN HANDLE hServer,
  384. IN DWORD Reserved,
  385. IN DWORD Version,
  386. OUT PWTS_PROCESS_INFOA * ppProcessInfo,
  387. OUT DWORD * pCount
  388. );
  389. #ifdef UNICODE
  390. #define WTSEnumerateProcesses WTSEnumerateProcessesW
  391. #else
  392. #define WTSEnumerateProcesses WTSEnumerateProcessesA
  393. #endif
  394. /*------------------------------------------------*/
  395. BOOL
  396. WINAPI
  397. WTSTerminateProcess(
  398. IN HANDLE hServer,
  399. IN DWORD ProcessId,
  400. IN DWORD ExitCode
  401. );
  402. /*------------------------------------------------*/
  403. BOOL
  404. WINAPI
  405. WTSQuerySessionInformationW(
  406. IN HANDLE hServer,
  407. IN DWORD SessionId,
  408. IN WTS_INFO_CLASS WTSInfoClass,
  409. OUT LPWSTR * ppBuffer,
  410. OUT DWORD * pBytesReturned
  411. );
  412. BOOL
  413. WINAPI
  414. WTSQuerySessionInformationA(
  415. IN HANDLE hServer,
  416. IN DWORD SessionId,
  417. IN WTS_INFO_CLASS WTSInfoClass,
  418. OUT LPSTR * ppBuffer,
  419. OUT DWORD * pBytesReturned
  420. );
  421. #ifdef UNICODE
  422. #define WTSQuerySessionInformation WTSQuerySessionInformationW
  423. #else
  424. #define WTSQuerySessionInformation WTSQuerySessionInformationA
  425. #endif
  426. /*------------------------------------------------*/
  427. BOOL
  428. WINAPI
  429. WTSQueryUserConfigW(
  430. IN LPWSTR pServerName,
  431. IN LPWSTR pUserName,
  432. IN WTS_CONFIG_CLASS WTSConfigClass,
  433. OUT LPWSTR * ppBuffer,
  434. OUT DWORD * pBytesReturned
  435. );
  436. BOOL
  437. WINAPI
  438. WTSQueryUserConfigA(
  439. IN LPSTR pServerName,
  440. IN LPSTR pUserName,
  441. IN WTS_CONFIG_CLASS WTSConfigClass,
  442. OUT LPSTR * ppBuffer,
  443. OUT DWORD * pBytesReturned
  444. );
  445. #ifdef UNICODE
  446. #define WTSQueryUserConfig WTSQueryUserConfigW
  447. #else
  448. #define WTSQueryUserConfig WTSQueryUserConfigA
  449. #endif
  450. /*------------------------------------------------*/
  451. BOOL
  452. WINAPI
  453. WTSSetUserConfigW(
  454. IN LPWSTR pServerName,
  455. IN LPWSTR pUserName,
  456. IN WTS_CONFIG_CLASS WTSConfigClass,
  457. IN LPWSTR pBuffer,
  458. IN DWORD DataLength
  459. );
  460. BOOL
  461. WINAPI
  462. WTSSetUserConfigA(
  463. IN LPSTR pServerName,
  464. IN LPSTR pUserName,
  465. IN WTS_CONFIG_CLASS WTSConfigClass,
  466. IN LPSTR pBuffer,
  467. IN DWORD DataLength
  468. );
  469. #ifdef UNICODE
  470. #define WTSSetUserConfig WTSSetUserConfigW
  471. #else
  472. #define WTSSetUserConfig WTSSetUserConfigA
  473. #endif
  474. /*------------------------------------------------*/
  475. BOOL
  476. WINAPI
  477. WTSSendMessageW(
  478. IN HANDLE hServer,
  479. IN DWORD SessionId,
  480. IN LPWSTR pTitle,
  481. IN DWORD TitleLength,
  482. IN LPWSTR pMessage,
  483. IN DWORD MessageLength,
  484. IN DWORD Style,
  485. IN DWORD Timeout,
  486. OUT DWORD * pResponse,
  487. IN BOOL bWait
  488. );
  489. BOOL
  490. WINAPI
  491. WTSSendMessageA(
  492. IN HANDLE hServer,
  493. IN DWORD SessionId,
  494. IN LPSTR pTitle,
  495. IN DWORD TitleLength,
  496. IN LPSTR pMessage,
  497. IN DWORD MessageLength,
  498. IN DWORD Style,
  499. IN DWORD Timeout,
  500. OUT DWORD * pResponse,
  501. IN BOOL bWait
  502. );
  503. #ifdef UNICODE
  504. #define WTSSendMessage WTSSendMessageW
  505. #else
  506. #define WTSSendMessage WTSSendMessageA
  507. #endif
  508. /*------------------------------------------------*/
  509. BOOL
  510. WINAPI
  511. WTSDisconnectSession(
  512. IN HANDLE hServer,
  513. IN DWORD SessionId,
  514. IN BOOL bWait
  515. );
  516. /*------------------------------------------------*/
  517. BOOL
  518. WINAPI
  519. WTSLogoffSession(
  520. IN HANDLE hServer,
  521. IN DWORD SessionId,
  522. IN BOOL bWait
  523. );
  524. /*------------------------------------------------*/
  525. BOOL
  526. WINAPI
  527. WTSShutdownSystem(
  528. IN HANDLE hServer,
  529. IN DWORD ShutdownFlag
  530. );
  531. /*------------------------------------------------*/
  532. BOOL
  533. WINAPI
  534. WTSWaitSystemEvent(
  535. IN HANDLE hServer,
  536. IN DWORD EventMask,
  537. OUT DWORD * pEventFlags
  538. );
  539. /*------------------------------------------------*/
  540. HANDLE
  541. WINAPI
  542. WTSVirtualChannelOpen(
  543. IN HANDLE hServer,
  544. IN DWORD SessionId,
  545. IN LPSTR pVirtualName /* ascii name */
  546. );
  547. BOOL
  548. WINAPI
  549. WTSVirtualChannelClose(
  550. IN HANDLE hChannelHandle
  551. );
  552. BOOL
  553. WINAPI
  554. WTSVirtualChannelRead(
  555. IN HANDLE hChannelHandle,
  556. IN ULONG TimeOut,
  557. OUT PCHAR Buffer,
  558. IN ULONG BufferSize,
  559. OUT PULONG pBytesRead
  560. );
  561. BOOL
  562. WINAPI
  563. WTSVirtualChannelWrite(
  564. IN HANDLE hChannelHandle,
  565. IN PCHAR Buffer,
  566. IN ULONG Length,
  567. OUT PULONG pBytesWritten
  568. );
  569. BOOL
  570. WINAPI
  571. WTSVirtualChannelPurgeInput(
  572. IN HANDLE hChannelHandle
  573. );
  574. BOOL
  575. WINAPI
  576. WTSVirtualChannelPurgeOutput(
  577. IN HANDLE hChannelHandle
  578. );
  579. BOOL
  580. WINAPI
  581. WTSVirtualChannelQuery(
  582. IN HANDLE hChannelHandle,
  583. IN WTS_VIRTUAL_CLASS,
  584. OUT PVOID *ppBuffer,
  585. OUT DWORD *pBytesReturned
  586. );
  587. /*------------------------------------------------*/
  588. VOID
  589. WINAPI
  590. WTSFreeMemory(
  591. IN PVOID pMemory
  592. );
  593. /* Flags for Console Notification */
  594. #define NOTIFY_FOR_ALL_SESSIONS 1
  595. #define NOTIFY_FOR_THIS_SESSION 0
  596. BOOL WINAPI
  597. WTSRegisterSessionNotification(
  598. HWND hWnd,
  599. DWORD dwFlags
  600. );
  601. BOOL WINAPI
  602. WTSUnRegisterSessionNotification(
  603. HWND hWnd
  604. );
  605. BOOL WINAPI
  606. WTSQueryUserToken(
  607. ULONG SessionId,
  608. PHANDLE phToken
  609. );
  610. #ifdef __cplusplus
  611. }
  612. #endif
  613. #endif /* !_INC_WTSAPI */