1 /* Copyright 2005 Ulrich Czekalla
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "wine/debug.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(wtsapi
);
28 static HMODULE WTSAPI32_hModule
;
30 BOOL WINAPI
DllMain (HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
32 TRACE("%p,%x,%p\n", hinstDLL
, fdwReason
, lpvReserved
);
35 case DLL_PROCESS_ATTACH
:
37 DisableThreadLibraryCalls(hinstDLL
);
38 WTSAPI32_hModule
= hinstDLL
;
41 case DLL_PROCESS_DETACH
:
50 /************************************************************
51 * WTSCloseServer (WTSAPI32.@)
53 void WINAPI
WTSCloseServer(HANDLE hServer
)
55 FIXME("Stub %p\n", hServer
);
58 /************************************************************
59 * WTSConnectSessionA (WTSAPI32.@)
61 BOOL WINAPI
WTSConnectSessionA(ULONG LogonId
, ULONG TargetLogonId
, PSTR pPassword
, BOOL bWait
)
63 FIXME("Stub %d %d (%s) %d\n", LogonId
, TargetLogonId
, debugstr_a(pPassword
), bWait
);
67 /************************************************************
68 * WTSConnectSessionW (WTSAPI32.@)
70 BOOL WINAPI
WTSConnectSessionW(ULONG LogonId
, ULONG TargetLogonId
, PWSTR pPassword
, BOOL bWait
)
72 FIXME("Stub %d %d (%s) %d\n", LogonId
, TargetLogonId
, debugstr_w(pPassword
), bWait
);
76 /************************************************************
77 * WTSDisconnectSession (WTSAPI32.@)
79 BOOL WINAPI
WTSDisconnectSession(HANDLE hServer
, DWORD SessionId
, BOOL bWait
)
81 FIXME("Stub %p 0x%08x %d\n", hServer
, SessionId
, bWait
);
85 /************************************************************
86 * WTSEnumerateProcessesA (WTSAPI32.@)
88 BOOL WINAPI
WTSEnumerateProcessesA(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
89 PWTS_PROCESS_INFOA
* ppProcessInfo
, DWORD
* pCount
)
91 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
92 ppProcessInfo
, pCount
);
94 if (!ppProcessInfo
|| !pCount
) return FALSE
;
97 *ppProcessInfo
= NULL
;
102 /************************************************************
103 * WTSEnumerateProcessesW (WTSAPI32.@)
105 BOOL WINAPI
WTSEnumerateProcessesW(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
106 PWTS_PROCESS_INFOW
* ppProcessInfo
, DWORD
* pCount
)
108 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
109 ppProcessInfo
, pCount
);
111 if (!ppProcessInfo
|| !pCount
) return FALSE
;
114 *ppProcessInfo
= NULL
;
119 /************************************************************
120 * WTSEnumerateServersA (WTSAPI32.@)
122 BOOL WINAPI
WTSEnumerateServersA(LPSTR pDomainName
, DWORD Reserved
, DWORD Version
, PWTS_SERVER_INFOA
*ppServerInfo
, DWORD
*pCount
)
124 FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_a(pDomainName
), Reserved
, Version
, ppServerInfo
, pCount
);
128 /************************************************************
129 * WTSEnumerateServersW (WTSAPI32.@)
131 BOOL WINAPI
WTSEnumerateServersW(LPWSTR pDomainName
, DWORD Reserved
, DWORD Version
, PWTS_SERVER_INFOW
*ppServerInfo
, DWORD
*pCount
)
133 FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_w(pDomainName
), Reserved
, Version
, ppServerInfo
, pCount
);
138 /************************************************************
139 * WTSEnumerateEnumerateSessionsA (WTSAPI32.@)
141 BOOL WINAPI
WTSEnumerateSessionsA(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
142 PWTS_SESSION_INFOA
* ppSessionInfo
, DWORD
* pCount
)
144 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
145 ppSessionInfo
, pCount
);
147 if (!ppSessionInfo
|| !pCount
) return FALSE
;
150 *ppSessionInfo
= NULL
;
155 /************************************************************
156 * WTSEnumerateEnumerateSessionsW (WTSAPI32.@)
158 BOOL WINAPI
WTSEnumerateSessionsW(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
159 PWTS_SESSION_INFOW
* ppSessionInfo
, DWORD
* pCount
)
161 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
162 ppSessionInfo
, pCount
);
164 if (!ppSessionInfo
|| !pCount
) return FALSE
;
167 *ppSessionInfo
= NULL
;
172 /************************************************************
173 * WTSFreeMemory (WTSAPI32.@)
175 void WINAPI
WTSFreeMemory(PVOID pMemory
)
177 FIXME("Stub %p\n", pMemory
);
180 /************************************************************
181 * WTSLogoffSession (WTSAPI32.@)
183 BOOL WINAPI
WTSLogoffSession(HANDLE hserver
, DWORD session_id
, BOOL bwait
)
185 FIXME("(%p, 0x%x, %d): stub\n", hserver
, session_id
, bwait
);
186 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
190 /************************************************************
191 * WTSOpenServerA (WTSAPI32.@)
193 HANDLE WINAPI
WTSOpenServerA(LPSTR pServerName
)
195 FIXME("(%s) stub\n", debugstr_a(pServerName
));
196 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
200 /************************************************************
201 * WTSOpenServerW (WTSAPI32.@)
203 HANDLE WINAPI
WTSOpenServerW(LPWSTR pServerName
)
205 FIXME("(%s) stub\n", debugstr_w(pServerName
));
206 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
210 /************************************************************
211 * WTSQuerySessionInformationA (WTSAPI32.@)
213 BOOL WINAPI
WTSQuerySessionInformationA(
216 WTS_INFO_CLASS WTSInfoClass
,
218 DWORD
* BytesReturned
)
220 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */
221 FIXME("Stub %p 0x%08x %d %p %p\n", hServer
, SessionId
, WTSInfoClass
,
222 Buffer
, BytesReturned
);
227 /************************************************************
228 * WTSQuerySessionInformationW (WTSAPI32.@)
230 BOOL WINAPI
WTSQuerySessionInformationW(
233 WTS_INFO_CLASS WTSInfoClass
,
235 DWORD
* BytesReturned
)
237 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */
238 FIXME("Stub %p 0x%08x %d %p %p\n", hServer
, SessionId
, WTSInfoClass
,
239 Buffer
, BytesReturned
);
244 /************************************************************
245 * WTSQueryUserToken (WTSAPI32.@)
247 BOOL WINAPI
WTSQueryUserToken(ULONG session_id
, PHANDLE token
)
249 FIXME("%u %p\n", session_id
, token
);
253 /************************************************************
254 * WTSQueryUserConfigA (WTSAPI32.@)
256 BOOL WINAPI
WTSQueryUserConfigA(LPSTR pServerName
, LPSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPSTR
*ppBuffer
, DWORD
*pBytesReturned
)
258 FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_a(pServerName
), debugstr_a(pUserName
), WTSConfigClass
,
259 ppBuffer
, pBytesReturned
);
263 /************************************************************
264 * WTSQueryUserConfigW (WTSAPI32.@)
266 BOOL WINAPI
WTSQueryUserConfigW(LPWSTR pServerName
, LPWSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPWSTR
*ppBuffer
, DWORD
*pBytesReturned
)
268 FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_w(pServerName
), debugstr_w(pUserName
), WTSConfigClass
,
269 ppBuffer
, pBytesReturned
);
274 /************************************************************
275 * WTSRegisterSessionNotification (WTSAPI32.@)
277 BOOL WINAPI
WTSRegisterSessionNotification(HWND hWnd
, DWORD dwFlags
)
279 FIXME("Stub %p 0x%08x\n", hWnd
, dwFlags
);
283 /************************************************************
284 * WTSRegisterSessionNotification (WTSAPI32.@)
286 BOOL WINAPI
WTSRegisterSessionNotificationEx(HANDLE hServer
, HWND hWnd
, DWORD dwFlags
)
288 FIXME("Stub %p %p 0x%08x\n", hServer
, hWnd
, dwFlags
);
293 /************************************************************
294 * WTSSendMessageA (WTSAPI32.@)
296 BOOL WINAPI
WTSSendMessageA(HANDLE hServer
, DWORD SessionId
, LPSTR pTitle
, DWORD TitleLength
, LPSTR pMessage
,
297 DWORD MessageLength
, DWORD Style
, DWORD Timeout
, DWORD
*pResponse
, BOOL bWait
)
299 FIXME("Stub %p 0x%08x (%s) %d (%s) %d 0x%08x %d %p %d\n", hServer
, SessionId
, debugstr_a(pTitle
), TitleLength
, debugstr_a(pMessage
), MessageLength
, Style
, Timeout
, pResponse
, bWait
);
303 /************************************************************
304 * WTSSendMessageW (WTSAPI32.@)
306 BOOL WINAPI
WTSSendMessageW(HANDLE hServer
, DWORD SessionId
, LPWSTR pTitle
, DWORD TitleLength
, LPWSTR pMessage
,
307 DWORD MessageLength
, DWORD Style
, DWORD Timeout
, DWORD
*pResponse
, BOOL bWait
)
309 FIXME("Stub %p 0x%08x (%s) %d (%s) %d 0x%08x %d %p %d\n", hServer
, SessionId
, debugstr_w(pTitle
), TitleLength
, debugstr_w(pMessage
), MessageLength
, Style
, Timeout
, pResponse
, bWait
);
313 /************************************************************
314 * WTSSetUserConfigA (WTSAPI32.@)
316 BOOL WINAPI
WTSSetUserConfigA(LPSTR pServerName
, LPSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPSTR pBuffer
, DWORD DataLength
)
318 FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_a(pServerName
), debugstr_a(pUserName
), WTSConfigClass
,pBuffer
, DataLength
);
322 /************************************************************
323 * WTSSetUserConfigW (WTSAPI32.@)
325 BOOL WINAPI
WTSSetUserConfigW(LPWSTR pServerName
, LPWSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPWSTR pBuffer
, DWORD DataLength
)
327 FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_w(pServerName
), debugstr_w(pUserName
), WTSConfigClass
,pBuffer
, DataLength
);
331 /************************************************************
332 * WTSShutdownSystem (WTSAPI32.@)
334 BOOL WINAPI
WTSShutdownSystem(HANDLE hServer
, DWORD ShutdownFlag
)
336 FIXME("Stub %p 0x%08x\n", hServer
,ShutdownFlag
);
340 /************************************************************
341 * WTSStartRemoteControlSessionA (WTSAPI32.@)
343 BOOL WINAPI
WTSStartRemoteControlSessionA(LPSTR pTargetServerName
, ULONG TargetLogonId
, BYTE HotkeyVk
, USHORT HotkeyModifiers
)
345 FIXME("Stub (%s) %d %d %d\n", debugstr_a(pTargetServerName
), TargetLogonId
, HotkeyVk
, HotkeyModifiers
);
349 /************************************************************
350 * WTSStartRemoteControlSessionW (WTSAPI32.@)
352 BOOL WINAPI
WTSStartRemoteControlSessionW(LPWSTR pTargetServerName
, ULONG TargetLogonId
, BYTE HotkeyVk
, USHORT HotkeyModifiers
)
354 FIXME("Stub (%s) %d %d %d\n", debugstr_w(pTargetServerName
), TargetLogonId
, HotkeyVk
, HotkeyModifiers
);
358 /************************************************************
359 * WTSStopRemoteControlSession (WTSAPI32.@)
361 BOOL WINAPI
WTSStopRemoteControlSession(ULONG LogonId
)
363 FIXME("Stub %d\n", LogonId
);
367 /************************************************************
368 * WTSTerminateProcess (WTSAPI32.@)
370 BOOL WINAPI
WTSTerminateProcess(HANDLE hServer
, DWORD ProcessId
, DWORD ExitCode
)
372 FIXME("Stub %p %d %d\n", hServer
, ProcessId
, ExitCode
);
376 /************************************************************
377 * WTSUnRegisterSessionNotification (WTSAPI32.@)
379 BOOL WINAPI
WTSUnRegisterSessionNotification(HWND hWnd
)
381 FIXME("Stub %p\n", hWnd
);
385 /************************************************************
386 * WTSUnRegisterSessionNotification (WTSAPI32.@)
388 BOOL WINAPI
WTSUnRegisterSessionNotificationEx(HANDLE hServer
, HWND hWnd
)
390 FIXME("Stub %p %p\n", hServer
, hWnd
);
395 /************************************************************
396 * WTSVirtualChannelClose (WTSAPI32.@)
398 BOOL WINAPI
WTSVirtualChannelClose(HANDLE hChannelHandle
)
400 FIXME("Stub %p\n", hChannelHandle
);
404 /************************************************************
405 * WTSVirtualChannelOpen (WTSAPI32.@)
407 HANDLE WINAPI
WTSVirtualChannelOpen(HANDLE hServer
, DWORD SessionId
, LPSTR pVirtualName
)
409 FIXME("Stub %p %d (%s)\n", hServer
, SessionId
, debugstr_a(pVirtualName
));
413 /************************************************************
414 * WTSVirtualChannelOpen (WTSAPI32.@)
416 HANDLE WINAPI
WTSVirtualChannelOpenEx(DWORD SessionId
, LPSTR pVirtualName
, DWORD flags
)
418 FIXME("Stub %d (%s) %d\n", SessionId
, debugstr_a(pVirtualName
), flags
);
422 /************************************************************
423 * WTSVirtualChannelPurgeInput (WTSAPI32.@)
425 BOOL WINAPI
WTSVirtualChannelPurgeInput(HANDLE hChannelHandle
)
427 FIXME("Stub %p\n", hChannelHandle
);
431 /************************************************************
432 * WTSVirtualChannelPurgeOutput (WTSAPI32.@)
434 BOOL WINAPI
WTSVirtualChannelPurgeOutput(HANDLE hChannelHandle
)
436 FIXME("Stub %p\n", hChannelHandle
);
441 /************************************************************
442 * WTSVirtualChannelQuery (WTSAPI32.@)
444 BOOL WINAPI
WTSVirtualChannelQuery(HANDLE hChannelHandle
, WTS_VIRTUAL_CLASS WtsVirtualClass
, PVOID
*ppBuffer
, DWORD
*pBytesReturned
)
446 FIXME("Stub %p %d %p %p\n", hChannelHandle
, WtsVirtualClass
, ppBuffer
, pBytesReturned
);
450 /************************************************************
451 * WTSVirtualChannelRead (WTSAPI32.@)
453 BOOL WINAPI
WTSVirtualChannelRead(HANDLE hChannelHandle
, ULONG TimeOut
, PCHAR Buffer
, ULONG BufferSize
, PULONG pBytesRead
)
455 FIXME("Stub %p %d %p %d %p\n", hChannelHandle
, TimeOut
, Buffer
, BufferSize
, pBytesRead
);
459 /************************************************************
460 * WTSVirtualChannelWrite (WTSAPI32.@)
462 BOOL WINAPI
WTSVirtualChannelWrite(HANDLE hChannelHandle
, PCHAR Buffer
, ULONG Length
, PULONG pBytesWritten
)
464 FIXME("Stub %p %p %d %p\n", hChannelHandle
, Buffer
, Length
, pBytesWritten
);
468 /************************************************************
469 * WTSWaitSystemEvent (WTSAPI32.@)
471 BOOL WINAPI
WTSWaitSystemEvent(HANDLE hServer
, DWORD Mask
, DWORD
* Flags
)
473 /* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */
474 FIXME("Stub %p 0x%08x %p\n", hServer
, Mask
, Flags
);