• R/O
  • HTTP
  • SSH
  • HTTPS

mingw-org-wsl: Commit

The MinGW.org Windows System Libraries


Commit MetaInfo

Revision80b16741ed8e2fa078d699f8691cac5179fef49a (tree)
Time2013-09-16 01:47:44
AuthorEarnie Boyd <earnie@user...>
CommiterEarnie Boyd

Log Message

Merge branch '4.0-dev'

Change Summary

Incremental Difference

--- a/ChangeLog
+++ b/ChangeLog
@@ -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+
113 2013-09-14 Earnie Boyd <earnie@users.sourceforge.net>
214
315 The winspool DLL name is actually winspool.drv.
--- a/include/wtsapi32.h
+++ b/include/wtsapi32.h
@@ -31,21 +31,6 @@ extern "C" {
3131 #endif
3232
3333 #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-
4934 // WTSWaitSystemEvent local server handle
5035 #define WTS_CURRENT_SERVER_HANDLE 0
5136 #define WTS_CURRENT_SESSION ((DWORD)-1)
@@ -64,18 +49,8 @@ typedef struct _WTS_SESSION_INFOA {
6449 #define WTS_EVENT_ALL 0x7FFFFFFF
6550 #define WTS_EVENT_FLUSH 0x80000000
6651
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);
7152 BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD EventMask, DWORD* pEventFlags);
7253 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);
7954 void WINAPI WTSFreeMemory(PVOID pMemory);
8055
8156 #define WTSEnumerateSessions __AW(WTSEnumerateSessions)
@@ -110,36 +85,36 @@ BOOL WTSSendMessageW(
11085 #define WTSSendMessage __AW(WTSSendMessage)
11186
11287 BOOL WTSVirtualChannelClose(
113- __in HANDLE hChannelHandle
88+ HANDLE hChannelHandle
11489 );
11590
11691 HANDLE WTSVirtualChannelOpen(
117- __in HANDLE hServer,
118- __in DWORD SessionId,
119- __in LPSTR pVirtualName
92+ HANDLE hServer,
93+ DWORD SessionId,
94+ LPSTR pVirtualName
12095 );
12196
12297 BOOL WTSVirtualChannelPurgeInput(
123- __in HANDLE hChannelHandle
98+ HANDLE hChannelHandle
12499 );
125100
126101 BOOL WTSVirtualChannelPurgeOutput(
127- __in HANDLE hChannelHandle
102+ HANDLE hChannelHandle
128103 );
129104
130105 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
136111 );
137112
138113 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
143118 );
144119 #endif /* _WIN32_WINNT >= _WIN32_WINNT_WIN2K */
145120
@@ -188,6 +163,11 @@ typedef enum _WTS_CONNECTSTATE_CLASS {
188163 WTSInit
189164 } WTS_CONNECTSTATE_CLASS;
190165
166+typedef enum _WTS_VIRTUAL_CLASS {
167+ WTSVirtualClientData,
168+ WTSVirtualFileHandle
169+} WTS_VIRTUAL_CLASS;
170+
191171 // session notification message flags
192172 #define WTS_CONSOLE_CONNECT 0x1
193173 #define WTS_CONSOLE_DISCONNECT 0x2
@@ -208,18 +188,44 @@ BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd);
208188 BOOL WINAPI WTSQueryUserToken(ULONG SessionId, PHANDLE pToken);
209189
210190 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
215195 );
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);
216222 #endif /* _WIN32_WINNT >= _WIN32_WINNT_WINXP */
217223
218224 #if _WIN32_WINNT >= _WIN32_WINNT_VISTA
219225 HANDLE WTSVirtualChannelOpenEx(
220- __in DWORD SessionId,
221- __in LPSTR pVirtualName,
222- __in DWORD flags
226+ DWORD SessionId,
227+ LPSTR pVirtualName,
228+ DWORD flags
223229 );
224230 #endif
225231
Show on old repository browser