2 * Copyright 2005 Ulrich Czekalla (For CodeWeavers)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_WTSAPI32_H
20 #define __WINE_WTSAPI32_H
27 typedef enum _WTS_VIRTUAL_CLASS
33 typedef enum tagWTS_INFO_CLASS
51 WTSClientProtocolType
,
54 typedef enum _WTS_CONNECTSTATE_CLASS
66 } WTS_CONNECTSTATE_CLASS
;
68 typedef enum _WTS_CONFIG_CLASS
70 WTSUserConfigInitialProgram
,
71 WTSUserConfigWorkingDirectory
,
72 WTSUserConfigInheritInitialProgram
,
73 WTSUserConfigAllowLogonTerminalServer
,
74 WTSUserConfigTimeoutSettingsConnections
,
75 WTSUserConfigTimeoutSettingsDisconnections
,
76 WTSUserConfigTimeoutSettingsIdle
,
77 WTSUserConfigDeviceClientDrives
,
78 WTSUserConfigDeviceClientPrinters
,
79 WTSUserConfigDeviceClientDefaultPrinter
,
80 WTSUserConfigBrokenTimeoutSettings
,
81 WTSUserConfigModemCallbackSettings
,
82 WTSUserConfigModemCallbackPhoneNumber
,
83 WTSUserConfigShadowSettings
,
84 WTSUserConfigTerminalServerProfilePath
,
85 WTSUserConfigTerminalServerHomeDirectory
,
86 WTSUserConfigfTerminalServerRemoteHomeDir
89 typedef enum _WTS_TYPE_CLASS
91 WTSTypeProcessInfoLevel0
,
92 WTSTypeProcessInfoLevel1
,
93 WTSTypeSessionInfoLevel1
96 typedef struct _WTS_PROCESS_INFOA
102 } WTS_PROCESS_INFOA
, *PWTS_PROCESS_INFOA
;
104 typedef struct _WTS_PROCESS_INFOW
110 } WTS_PROCESS_INFOW
, *PWTS_PROCESS_INFOW
;
112 DECL_WINELIB_TYPE_AW(WTS_PROCESS_INFO
)
113 DECL_WINELIB_TYPE_AW(PWTS_PROCESS_INFO
)
115 typedef struct _WTS_SESSION_INFOA
118 LPSTR pWinStationName
;
119 WTS_CONNECTSTATE_CLASS State
;
120 } WTS_SESSION_INFOA
, *PWTS_SESSION_INFOA
;
122 typedef struct _WTS_SESSION_INFOW
125 LPWSTR pWinStationName
;
126 WTS_CONNECTSTATE_CLASS State
;
127 } WTS_SESSION_INFOW
, *PWTS_SESSION_INFOW
;
129 DECL_WINELIB_TYPE_AW(WTS_SESSION_INFO
)
130 DECL_WINELIB_TYPE_AW(PWTS_SESSION_INFO
)
132 typedef struct _WTS_SESSION_INFO_1A
135 WTS_CONNECTSTATE_CLASS State
;
142 } WTS_SESSION_INFO_1A
, *PWTS_SESSION_INFO_1A
;
144 typedef struct _WTS_SESSION_INFO_1W
147 WTS_CONNECTSTATE_CLASS State
;
154 } WTS_SESSION_INFO_1W
, *PWTS_SESSION_INFO_1W
;
156 DECL_WINELIB_TYPE_AW(WTS_SESSION_INFO_1
)
157 DECL_WINELIB_TYPE_AW(PWTS_SESSION_INFO_1
)
159 typedef struct _WTS_SERVER_INFOA
162 } WTS_SERVER_INFOA
, *PWTS_SERVER_INFOA
;
164 typedef struct _WTS_SERVER_INFOW
167 } WTS_SERVER_INFOW
, *PWTS_SERVER_INFOW
;
169 DECL_WINELIB_TYPE_AW(WTS_SERVER_INFO
)
170 DECL_WINELIB_TYPE_AW(PWTS_SERVER_INFO
)
172 #define WTS_CURRENT_SERVER_HANDLE ((HANDLE)NULL)
173 #define WTS_CURRENT_SESSION (~0u)
174 #define WTS_ANY_SESSION ((DWORD)-2)
176 void WINAPI
WTSCloseServer(HANDLE
);
177 BOOL WINAPI
WTSConnectSessionA(ULONG
, ULONG
, PSTR
, BOOL
);
178 BOOL WINAPI
WTSConnectSessionW(ULONG
, ULONG
, PWSTR
, BOOL
);
179 #define WTSConnectSession WINELIB_NAME_AW(WTSConnectSession)
180 BOOL WINAPI
WTSDisconnectSession(HANDLE
, DWORD
, BOOL
);
181 BOOL WINAPI
WTSEnableChildSessions(BOOL
);
182 BOOL WINAPI
WTSEnumerateProcessesA(HANDLE
, DWORD
, DWORD
, PWTS_PROCESS_INFOA
*, DWORD
*);
183 BOOL WINAPI
WTSEnumerateProcessesW(HANDLE
, DWORD
, DWORD
, PWTS_PROCESS_INFOW
*, DWORD
*);
184 #define WTSEnumerateProcesses WINELIB_NAME_AW(WTSEnumerateProcesses)
185 BOOL WINAPI
WTSEnumerateServersA( LPSTR
, DWORD
, DWORD
, PWTS_SERVER_INFOA
*, DWORD
*);
186 BOOL WINAPI
WTSEnumerateServersW( LPWSTR
, DWORD
, DWORD
, PWTS_SERVER_INFOW
*, DWORD
*);
187 #define WTSEnumerateServers WINELIB_NAME_AW(WTSEnumerateServers)
188 BOOL WINAPI
WTSEnumerateSessionsA(HANDLE
, DWORD
, DWORD
, PWTS_SESSION_INFOA
*, DWORD
*);
189 BOOL WINAPI
WTSEnumerateSessionsW(HANDLE
, DWORD
, DWORD
, PWTS_SESSION_INFOW
*, DWORD
*);
190 #define WTSEnumerateSessions WINELIB_NAME_AW(WTSEnumerateSessions)
191 void WINAPI
WTSFreeMemory(PVOID
);
192 HANDLE WINAPI
WTSOpenServerA(LPSTR
);
193 HANDLE WINAPI
WTSOpenServerW(LPWSTR
);
194 #define WTSOpenServer WINELIB_NAME_AW(WTSOpenServer)
195 BOOL WINAPI
WTSQuerySessionInformationA(HANDLE
, DWORD
, WTS_INFO_CLASS
, LPSTR
*, DWORD
*);
196 BOOL WINAPI
WTSQuerySessionInformationW(HANDLE
, DWORD
, WTS_INFO_CLASS
, LPWSTR
*, DWORD
*);
197 #define WTSQuerySessionInformation WINELIB_NAME_AW(WTSQuerySessionInformation)
198 BOOL WINAPI
WTSQueryUserConfigA(LPSTR
,LPSTR
,WTS_CONFIG_CLASS
,LPSTR
*,DWORD
*);
199 BOOL WINAPI
WTSQueryUserConfigW(LPWSTR
,LPWSTR
,WTS_CONFIG_CLASS
,LPWSTR
*,DWORD
*);
200 #define WTSQueryUserConfig WINELIB_NAME_AW(WTSQueryUserConfig)
201 BOOL WINAPI
WTSQueryUserToken(ULONG
, PHANDLE
);
202 BOOL WINAPI
WTSRegisterSessionNotification(HWND
, DWORD
);
203 BOOL WINAPI
WTSRegisterSessionNotificationEx(HANDLE
, HWND
, DWORD
);
204 BOOL WINAPI
WTSStartRemoteControlSessionA(LPSTR
, ULONG
, BYTE
, USHORT
);
205 BOOL WINAPI
WTSStartRemoteControlSessionW(LPWSTR
, ULONG
, BYTE
, USHORT
);
206 #define WTSStartRemoteControlSession WINELIB_NAME_AW(WTSStartRemoteControlSession)
207 BOOL WINAPI
WTSStopRemoteControlSession(ULONG
);
208 BOOL WINAPI
WTSTerminateProcess(HANDLE
, DWORD
, DWORD
);
209 BOOL WINAPI
WTSUnRegisterSessionNotification(HWND
);
210 BOOL WINAPI
WTSUnRegisterSessionNotificationEx(HANDLE
, HWND
);
211 BOOL WINAPI
WTSWaitSystemEvent(HANDLE
, DWORD
, DWORD
*);