The MinGW.org Windows System Libraries
Revisão | 7213185c53a45ba7d16d7afbbb284fa9bfc6070a (tree) |
---|---|
Hora | 2013-09-16 00:55:26 |
Autor | Earnie Boyd <earnie@user...> |
Commiter | Earnie Boyd |
[bugs#2045] wtsapi32.h not working for _WIN32_WINNT_WINXP.
@@ -1,3 +1,15 @@ | ||
1 | +2013-09-15 Earnie Boyd <earnie@users.sourceforge.net> | |
2 | + | |
3 | + Ticket [#2045] for wtsapi32.h errors, thanks to | |
4 | + Janne Rönkkö <jroo@iki.fi>. | |
5 | + | |
6 | + * include/wtsapi32.h: Remove use of __in and __out throughout. | |
7 | + (WTS_SESSION_INFOA, WTS_SESSION_INFOW): Move to the _WIN32_WINNT_WINXP | |
8 | + filter after the WTS_CONNECTSTATE_CLASS structure. | |
9 | + (WTSQuerySessionInformation[AW]): Move to the _WIN32_WINNT_WINXP filter. | |
10 | + (WTSEnumerateSessions[AW]): Ditto. | |
11 | + (WTS_VIRTUAL_CLASS): Add enumeration to _WIN32_WINNT_WINXP filter. | |
12 | + | |
1 | 13 | 2013-09-14 Earnie Boyd <earnie@users.sourceforge.net> |
2 | 14 | |
3 | 15 | The winspool DLL name is actually winspool.drv. |
@@ -31,21 +31,6 @@ extern "C" { | ||
31 | 31 | #endif |
32 | 32 | |
33 | 33 | #if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) |
34 | -typedef struct _WTS_SESSION_INFOW { | |
35 | - DWORD SessionId; | |
36 | - LPWSTR pWinStationName; | |
37 | - WTS_CONNECTSTATE_CLASS State; | |
38 | -} WTS_SESSION_INFOW, *PWTS_SESSION_INFOW; | |
39 | - | |
40 | -typedef struct _WTS_SESSION_INFOA { | |
41 | - DWORD SessionId; | |
42 | - LPSTR pWinStationName; | |
43 | - WTS_CONNECTSTATE_CLASS State; | |
44 | -} WTS_SESSION_INFOA, *PWTS_SESSION_INFOA; | |
45 | - | |
46 | -#define WTS_SESSION_INFO __AW(WTS_SESSION_INFO) | |
47 | -#define PWTS_SESSION_INFO __AW(PWTS_SESSION_INFO) | |
48 | - | |
49 | 34 | // WTSWaitSystemEvent local server handle |
50 | 35 | #define WTS_CURRENT_SERVER_HANDLE 0 |
51 | 36 | #define WTS_CURRENT_SESSION ((DWORD)-1) |
@@ -64,18 +49,8 @@ typedef struct _WTS_SESSION_INFOA { | ||
64 | 49 | #define WTS_EVENT_ALL 0x7FFFFFFF |
65 | 50 | #define WTS_EVENT_FLUSH 0x80000000 |
66 | 51 | |
67 | -BOOL WINAPI WTSQuerySessionInformationA(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, | |
68 | - LPSTR *ppBuffer, DWORD *pBytesReturned); | |
69 | -BOOL WINAPI WTSQuerySessionInformationW(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, | |
70 | - LPTSTR *ppBuffer, DWORD *pBytesReturned); | |
71 | 52 | BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD EventMask, DWORD* pEventFlags); |
72 | 53 | BOOL WINAPI WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait); |
73 | -BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version, | |
74 | - PWTS_SESSION_INFOW *ppSessionInfo, | |
75 | - PDWORD pCount); | |
76 | -BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version, | |
77 | - PWTS_SESSION_INFOA *ppSessionInfo, | |
78 | - PDWORD pCount); | |
79 | 54 | void WINAPI WTSFreeMemory(PVOID pMemory); |
80 | 55 | |
81 | 56 | #define WTSEnumerateSessions __AW(WTSEnumerateSessions) |
@@ -110,36 +85,36 @@ BOOL WTSSendMessageW( | ||
110 | 85 | #define WTSSendMessage __AW(WTSSendMessage) |
111 | 86 | |
112 | 87 | BOOL WTSVirtualChannelClose( |
113 | - __in HANDLE hChannelHandle | |
88 | + HANDLE hChannelHandle | |
114 | 89 | ); |
115 | 90 | |
116 | 91 | HANDLE WTSVirtualChannelOpen( |
117 | - __in HANDLE hServer, | |
118 | - __in DWORD SessionId, | |
119 | - __in LPSTR pVirtualName | |
92 | + HANDLE hServer, | |
93 | + DWORD SessionId, | |
94 | + LPSTR pVirtualName | |
120 | 95 | ); |
121 | 96 | |
122 | 97 | BOOL WTSVirtualChannelPurgeInput( |
123 | - __in HANDLE hChannelHandle | |
98 | + HANDLE hChannelHandle | |
124 | 99 | ); |
125 | 100 | |
126 | 101 | BOOL WTSVirtualChannelPurgeOutput( |
127 | - __in HANDLE hChannelHandle | |
102 | + HANDLE hChannelHandle | |
128 | 103 | ); |
129 | 104 | |
130 | 105 | BOOL WTSVirtualChannelRead( |
131 | - __in HANDLE hChannelHandle, | |
132 | - __in ULONG TimeOut, | |
133 | - __out PCHAR Buffer, | |
134 | - __in ULONG BufferSize, | |
135 | - __out PULONG pBytesRead | |
106 | + HANDLE hChannelHandle, | |
107 | + ULONG TimeOut, | |
108 | + PCHAR Buffer, | |
109 | + ULONG BufferSize, | |
110 | + PULONG pBytesRead | |
136 | 111 | ); |
137 | 112 | |
138 | 113 | BOOL WTSVirtualChannelWrite( |
139 | - __in HANDLE hChannelHandle, | |
140 | - __in PCHAR Buffer, | |
141 | - __in ULONG Length, | |
142 | - __out PULONG pBytesWritten | |
114 | + HANDLE hChannelHandle, | |
115 | + PCHAR Buffer, | |
116 | + ULONG Length, | |
117 | + PULONG pBytesWritten | |
143 | 118 | ); |
144 | 119 | #endif /* _WIN32_WINNT >= _WIN32_WINNT_WIN2K */ |
145 | 120 |
@@ -188,6 +163,11 @@ typedef enum _WTS_CONNECTSTATE_CLASS { | ||
188 | 163 | WTSInit |
189 | 164 | } WTS_CONNECTSTATE_CLASS; |
190 | 165 | |
166 | +typedef enum _WTS_VIRTUAL_CLASS { | |
167 | + WTSVirtualClientData, | |
168 | + WTSVirtualFileHandle | |
169 | +} WTS_VIRTUAL_CLASS; | |
170 | + | |
191 | 171 | // session notification message flags |
192 | 172 | #define WTS_CONSOLE_CONNECT 0x1 |
193 | 173 | #define WTS_CONSOLE_DISCONNECT 0x2 |
@@ -208,18 +188,44 @@ BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd); | ||
208 | 188 | BOOL WINAPI WTSQueryUserToken(ULONG SessionId, PHANDLE pToken); |
209 | 189 | |
210 | 190 | BOOL WTSVirtualChannelQuery( |
211 | - __in HANDLE hChannelHandle, | |
212 | - __in WTS_VIRTUAL_CLASS WtsVirtualClass, | |
213 | - __out PVOID *ppBuffer, | |
214 | - __out DWORD *pBytesReturned | |
191 | + HANDLE hChannelHandle, | |
192 | + WTS_VIRTUAL_CLASS WtsVirtualClass, | |
193 | + PVOID *ppBuffer, | |
194 | + DWORD *pBytesReturned | |
215 | 195 | ); |
196 | + | |
197 | +typedef struct _WTS_SESSION_INFOW { | |
198 | + DWORD SessionId; | |
199 | + LPWSTR pWinStationName; | |
200 | + WTS_CONNECTSTATE_CLASS State; | |
201 | +} WTS_SESSION_INFOW, *PWTS_SESSION_INFOW; | |
202 | + | |
203 | +typedef struct _WTS_SESSION_INFOA { | |
204 | + DWORD SessionId; | |
205 | + LPSTR pWinStationName; | |
206 | + WTS_CONNECTSTATE_CLASS State; | |
207 | +} WTS_SESSION_INFOA, *PWTS_SESSION_INFOA; | |
208 | + | |
209 | +#define WTS_SESSION_INFO __AW(WTS_SESSION_INFO) | |
210 | +#define PWTS_SESSION_INFO __AW(PWTS_SESSION_INFO) | |
211 | + | |
212 | +BOOL WINAPI WTSQuerySessionInformationA(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, | |
213 | + LPSTR *ppBuffer, DWORD *pBytesReturned); | |
214 | +BOOL WINAPI WTSQuerySessionInformationW(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, | |
215 | + LPTSTR *ppBuffer, DWORD *pBytesReturned); | |
216 | +BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version, | |
217 | + PWTS_SESSION_INFOW *ppSessionInfo, | |
218 | + PDWORD pCount); | |
219 | +BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version, | |
220 | + PWTS_SESSION_INFOA *ppSessionInfo, | |
221 | + PDWORD pCount); | |
216 | 222 | #endif /* _WIN32_WINNT >= _WIN32_WINNT_WINXP */ |
217 | 223 | |
218 | 224 | #if _WIN32_WINNT >= _WIN32_WINNT_VISTA |
219 | 225 | HANDLE WTSVirtualChannelOpenEx( |
220 | - __in DWORD SessionId, | |
221 | - __in LPSTR pVirtualName, | |
222 | - __in DWORD flags | |
226 | + DWORD SessionId, | |
227 | + LPSTR pVirtualName, | |
228 | + DWORD flags | |
223 | 229 | ); |
224 | 230 | #endif |
225 | 231 |