blob: 55309bc245a0a1781139843b3ba90f60e95a52e3 [file] [log] [blame]
Ulrich Czekalla04f63462005-01-24 19:42:02 +00001/*
2 * Copyright 2005 Ulrich Czekalla (For CodeWeavers)
3 *
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.
8 *
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.
13 *
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
Jonathan Ernst360a3f92006-05-18 14:49:52 +020016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Ulrich Czekalla04f63462005-01-24 19:42:02 +000017 */
18
19#ifndef __WINE_WTSAPI32_H
20#define __WINE_WTSAPI32_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26
27typedef enum tagWTS_INFO_CLASS
28{
29 WTSInitialProgram,
30 WTSApplicationName,
31 WTSWorkingDirectory,
32 WTSOEMId,
33 WTSSessionId,
34 WTSUserName,
35 WTSWinStationName,
36 WTSDomainName,
37 WTSConnectState,
38 WTSClientBuildNumber,
39 WTSClientName,
40 WTSClientDirectory,
41 WTSClientProductId,
42 WTSClientHardwareId,
43 WTSClientAddress,
44 WTSClientDisplay,
45 WTSClientProtocolType,
46} WTS_INFO_CLASS;
47
Hans Leidekkere8e1c652005-03-16 11:27:05 +000048typedef enum _WTS_CONNECTSTATE_CLASS
49{
50 WTSActive,
51 WTSConnected,
52 WTSConnectQuery,
53 WTSShadow,
54 WTSDisconnected,
55 WTSIdle,
56 WTSListen,
57 WTSReset,
58 WTSDown,
59 WTSInit
60} WTS_CONNECTSTATE_CLASS;
61
Mike McCormack20e23d82005-04-15 14:10:00 +000062typedef enum _WTS_CONFIG_CLASS
63{
64 WTSUserConfigInitialProgram,
65 WTSUserConfigWorkingDirectory,
66 WTSUserConfigInheritInitialProgram,
67 WTSUserConfigAllowLogonTerminalServer,
68 WTSUserConfigTimeoutSettingsConnections,
69 WTSUserConfigTimeoutSettingsDisconnections,
70 WTSUserConfigTimeoutSettingsIdle,
71 WTSUserConfigDeviceClientDrives,
72 WTSUserConfigDeviceClientPrinters,
73 WTSUserConfigDeviceClientDefaultPrinter,
74 WTSUserConfigBrokenTimeoutSettings,
75 WTSUserConfigModemCallbackSettings,
76 WTSUserConfigModemCallbackPhoneNumber,
77 WTSUserConfigShadowSettings,
78 WTSUserConfigTerminalServerProfilePath,
79 WTSUserConfigTerminalServerHomeDirectory,
80 WTSUserConfigfTerminalServerRemoteHomeDir
81} WTS_CONFIG_CLASS;
82
Hans Leidekkere8e1c652005-03-16 11:27:05 +000083typedef struct _WTS_PROCESS_INFOA
84{
85 DWORD SessionId;
86 DWORD ProcessId;
87 LPSTR pProcessName;
88 PSID pUserSid;
89} WTS_PROCESS_INFOA, *PWTS_PROCESS_INFOA;
90
91typedef struct _WTS_PROCESS_INFOW
92{
93 DWORD SessionId;
94 DWORD ProcessId;
95 LPWSTR pProcessName;
96 PSID pUserSid;
97} WTS_PROCESS_INFOW, *PWTS_PROCESS_INFOW;
98
Mike McCormack20e23d82005-04-15 14:10:00 +000099DECL_WINELIB_TYPE_AW(WTS_PROCESS_INFO)
100DECL_WINELIB_TYPE_AW(PWTS_PROCESS_INFO)
101
Hans Leidekkere8e1c652005-03-16 11:27:05 +0000102typedef struct _WTS_SESSION_INFOA
103{
104 DWORD SessionId;
105 LPSTR pWinStationName;
106 WTS_CONNECTSTATE_CLASS State;
107} WTS_SESSION_INFOA, *PWTS_SESSION_INFOA;
108
109typedef struct _WTS_SESSION_INFOW
110{
111 DWORD SessionId;
112 LPWSTR pWinStationName;
113 WTS_CONNECTSTATE_CLASS State;
114} WTS_SESSION_INFOW, *PWTS_SESSION_INFOW;
Ulrich Czekalla04f63462005-01-24 19:42:02 +0000115
Mike McCormack20e23d82005-04-15 14:10:00 +0000116DECL_WINELIB_TYPE_AW(WTS_SESSION_INFO)
117DECL_WINELIB_TYPE_AW(PWTS_SESSION_INFO)
118
119typedef struct _WTS_SERVER_INFOA
120{
121 LPSTR pServerName;
122} WTS_SERVER_INFOA, *PWTS_SERVER_INFOA;
123
124typedef struct _WTS_SERVER_INFOW
125{
126 LPWSTR pServerName;
127} WTS_SERVER_INFOW, *PWTS_SERVER_INFOW;
128
129DECL_WINELIB_TYPE_AW(WTS_SERVER_INFO)
130DECL_WINELIB_TYPE_AW(PWTS_SERVER_INFO)
131
Vincent Béron1e365f72005-03-21 10:32:45 +0000132void WINAPI WTSCloseServer(HANDLE);
133BOOL WINAPI WTSDisconnectSession(HANDLE, DWORD, BOOL);
134BOOL WINAPI WTSEnumerateProcessesA(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOA *, DWORD *);
135BOOL WINAPI WTSEnumerateProcessesW(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOW *, DWORD *);
136#define WTSEnumerateProcesses WINELIB_NAME_AW(WTSEnumerateProcesses)
Mike McCormack20e23d82005-04-15 14:10:00 +0000137BOOL WINAPI WTSEnumerateServersA( LPSTR, DWORD, DWORD, PWTS_SERVER_INFOA*, DWORD*);
138BOOL WINAPI WTSEnumerateServersW( LPWSTR, DWORD, DWORD, PWTS_SERVER_INFOW*, DWORD*);
139#define WTSEnumerateServers WINELIB_NAME_AW(WTSEnumerateServers)
Vincent Béron1e365f72005-03-21 10:32:45 +0000140BOOL WINAPI WTSEnumerateSessionsA(HANDLE, DWORD, DWORD, PWTS_SESSION_INFOA *, DWORD *);
141BOOL WINAPI WTSEnumerateSessionsW(HANDLE, DWORD, DWORD, PWTS_SESSION_INFOW *, DWORD *);
142#define WTSEnumerateSessions WINELIB_NAME_AW(WTSEnumerateSessions)
Huw Daviesbd4af762005-04-19 12:00:29 +0000143void WINAPI WTSFreeMemory(PVOID);
Mike McCormack20e23d82005-04-15 14:10:00 +0000144HANDLE WINAPI WTSOpenServerA(LPSTR);
145HANDLE WINAPI WTSOpenServerW(LPWSTR);
146#define WTSOpenServer WINELIB_NAME_AW(WTSOpenServer)
Vincent Béron1e365f72005-03-21 10:32:45 +0000147BOOL WINAPI WTSQuerySessionInformationA(HANDLE, DWORD, WTS_INFO_CLASS, LPSTR *, DWORD *);
148BOOL WINAPI WTSQuerySessionInformationW(HANDLE, DWORD, WTS_INFO_CLASS, LPWSTR *, DWORD *);
149#define WTSQuerySessionInformation WINELIB_NAME_AW(WTSQuerySessionInformation)
Mike McCormack20e23d82005-04-15 14:10:00 +0000150BOOL WINAPI WTSQueryUserConfigA(LPSTR,LPSTR,WTS_CONFIG_CLASS,LPSTR*,DWORD*);
151BOOL WINAPI WTSQueryUserConfigW(LPWSTR,LPWSTR,WTS_CONFIG_CLASS,LPWSTR*,DWORD*);
152#define WTSQueryUserConfig WINELIB_NAME_AW(WTSQueryUserConfig)
153BOOL WINAPI WTSQueryUserToken(ULONG, PHANDLE);
154BOOL WINAPI WTSRegisterSessionNotification(HWND, DWORD);
155BOOL WINAPI WTSTerminateProcess(HANDLE, DWORD, DWORD);
156BOOL WINAPI WTSUnRegisterSessionNotification(HWND);
Vincent Béron1e365f72005-03-21 10:32:45 +0000157BOOL WINAPI WTSWaitSystemEvent(HANDLE, DWORD, DWORD*);
Ulrich Czekalla04f63462005-01-24 19:42:02 +0000158
159#ifdef __cplusplus
160}
161#endif
162
163#endif