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
);
29 BOOL WINAPI
DllMain (HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
31 TRACE("%p,%x,%p\n", hinstDLL
, fdwReason
, lpvReserved
);
34 case DLL_PROCESS_ATTACH
:
36 DisableThreadLibraryCalls(hinstDLL
);
39 case DLL_PROCESS_DETACH
:
48 /************************************************************
49 * WTSCloseServer (WTSAPI32.@)
51 void WINAPI
WTSCloseServer(HANDLE hServer
)
53 FIXME("Stub %p\n", hServer
);
56 /************************************************************
57 * WTSConnectSessionA (WTSAPI32.@)
59 BOOL WINAPI
WTSConnectSessionA(ULONG LogonId
, ULONG TargetLogonId
, PSTR pPassword
, BOOL bWait
)
61 FIXME("Stub %d %d (%s) %d\n", LogonId
, TargetLogonId
, debugstr_a(pPassword
), bWait
);
65 /************************************************************
66 * WTSConnectSessionW (WTSAPI32.@)
68 BOOL WINAPI
WTSConnectSessionW(ULONG LogonId
, ULONG TargetLogonId
, PWSTR pPassword
, BOOL bWait
)
70 FIXME("Stub %d %d (%s) %d\n", LogonId
, TargetLogonId
, debugstr_w(pPassword
), bWait
);
74 /************************************************************
75 * WTSDisconnectSession (WTSAPI32.@)
77 BOOL WINAPI
WTSDisconnectSession(HANDLE hServer
, DWORD SessionId
, BOOL bWait
)
79 FIXME("Stub %p 0x%08x %d\n", hServer
, SessionId
, bWait
);
83 /************************************************************
84 * WTSEnumerateProcessesA (WTSAPI32.@)
86 BOOL WINAPI
WTSEnumerateProcessesA(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
87 PWTS_PROCESS_INFOA
* ppProcessInfo
, DWORD
* pCount
)
89 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
90 ppProcessInfo
, pCount
);
92 if (!ppProcessInfo
|| !pCount
) return FALSE
;
95 *ppProcessInfo
= NULL
;
100 /************************************************************
101 * WTSEnumerateProcessesW (WTSAPI32.@)
103 BOOL WINAPI
WTSEnumerateProcessesW(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
104 PWTS_PROCESS_INFOW
* ppProcessInfo
, DWORD
* pCount
)
106 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
107 ppProcessInfo
, pCount
);
109 if (!ppProcessInfo
|| !pCount
) return FALSE
;
112 *ppProcessInfo
= NULL
;
117 /************************************************************
118 * WTSEnumerateServersA (WTSAPI32.@)
120 BOOL WINAPI
WTSEnumerateServersA(LPSTR pDomainName
, DWORD Reserved
, DWORD Version
, PWTS_SERVER_INFOA
*ppServerInfo
, DWORD
*pCount
)
122 FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_a(pDomainName
), Reserved
, Version
, ppServerInfo
, pCount
);
126 /************************************************************
127 * WTSEnumerateServersW (WTSAPI32.@)
129 BOOL WINAPI
WTSEnumerateServersW(LPWSTR pDomainName
, DWORD Reserved
, DWORD Version
, PWTS_SERVER_INFOW
*ppServerInfo
, DWORD
*pCount
)
131 FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_w(pDomainName
), Reserved
, Version
, ppServerInfo
, pCount
);
136 /************************************************************
137 * WTSEnumerateEnumerateSessionsA (WTSAPI32.@)
139 BOOL WINAPI
WTSEnumerateSessionsA(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
140 PWTS_SESSION_INFOA
* ppSessionInfo
, DWORD
* pCount
)
142 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
143 ppSessionInfo
, pCount
);
145 if (!ppSessionInfo
|| !pCount
) return FALSE
;
148 *ppSessionInfo
= NULL
;
153 /************************************************************
154 * WTSEnumerateEnumerateSessionsW (WTSAPI32.@)
156 BOOL WINAPI
WTSEnumerateSessionsW(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
157 PWTS_SESSION_INFOW
* ppSessionInfo
, DWORD
* pCount
)
159 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
160 ppSessionInfo
, pCount
);
162 if (!ppSessionInfo
|| !pCount
) return FALSE
;
165 *ppSessionInfo
= NULL
;
170 /************************************************************
171 * WTSFreeMemory (WTSAPI32.@)
173 void WINAPI
WTSFreeMemory(PVOID pMemory
)
175 FIXME("Stub %p\n", pMemory
);
178 /************************************************************
179 * WTSLogoffSession (WTSAPI32.@)
181 BOOL WINAPI
WTSLogoffSession(HANDLE hserver
, DWORD session_id
, BOOL bwait
)
183 FIXME("(%p, 0x%x, %d): stub\n", hserver
, session_id
, bwait
);
184 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
188 /************************************************************
189 * WTSOpenServerA (WTSAPI32.@)
191 HANDLE WINAPI
WTSOpenServerA(LPSTR pServerName
)
193 FIXME("(%s) stub\n", debugstr_a(pServerName
));
194 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
198 /************************************************************
199 * WTSOpenServerW (WTSAPI32.@)
201 HANDLE WINAPI
WTSOpenServerW(LPWSTR pServerName
)
203 FIXME("(%s) stub\n", debugstr_w(pServerName
));
204 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
208 /************************************************************
209 * WTSQuerySessionInformationA (WTSAPI32.@)
211 BOOL WINAPI
WTSQuerySessionInformationA(
214 WTS_INFO_CLASS WTSInfoClass
,
216 DWORD
* BytesReturned
)
218 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */
219 FIXME("Stub %p 0x%08x %d %p %p\n", hServer
, SessionId
, WTSInfoClass
,
220 Buffer
, BytesReturned
);
225 /************************************************************
226 * WTSQuerySessionInformationW (WTSAPI32.@)
228 BOOL WINAPI
WTSQuerySessionInformationW(
231 WTS_INFO_CLASS WTSInfoClass
,
233 DWORD
* BytesReturned
)
235 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */
236 FIXME("Stub %p 0x%08x %d %p %p\n", hServer
, SessionId
, WTSInfoClass
,
237 Buffer
, BytesReturned
);
242 /************************************************************
243 * WTSQueryUserToken (WTSAPI32.@)
245 BOOL WINAPI
WTSQueryUserToken(ULONG session_id
, PHANDLE token
)
247 FIXME("%u %p\n", session_id
, token
);
251 /************************************************************
252 * WTSQueryUserConfigA (WTSAPI32.@)
254 BOOL WINAPI
WTSQueryUserConfigA(LPSTR pServerName
, LPSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPSTR
*ppBuffer
, DWORD
*pBytesReturned
)
256 FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_a(pServerName
), debugstr_a(pUserName
), WTSConfigClass
,
257 ppBuffer
, pBytesReturned
);
261 /************************************************************
262 * WTSQueryUserConfigW (WTSAPI32.@)
264 BOOL WINAPI
WTSQueryUserConfigW(LPWSTR pServerName
, LPWSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPWSTR
*ppBuffer
, DWORD
*pBytesReturned
)
266 FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_w(pServerName
), debugstr_w(pUserName
), WTSConfigClass
,
267 ppBuffer
, pBytesReturned
);
272 /************************************************************
273 * WTSRegisterSessionNotification (WTSAPI32.@)
275 BOOL WINAPI
WTSRegisterSessionNotification(HWND hWnd
, DWORD dwFlags
)
277 FIXME("Stub %p 0x%08x\n", hWnd
, dwFlags
);
281 /************************************************************
282 * WTSRegisterSessionNotification (WTSAPI32.@)
284 BOOL WINAPI
WTSRegisterSessionNotificationEx(HANDLE hServer
, HWND hWnd
, DWORD dwFlags
)
286 FIXME("Stub %p %p 0x%08x\n", hServer
, hWnd
, dwFlags
);
291 /************************************************************
292 * WTSSendMessageA (WTSAPI32.@)
294 BOOL WINAPI
WTSSendMessageA(HANDLE hServer
, DWORD SessionId
, LPSTR pTitle
, DWORD TitleLength
, LPSTR pMessage
,
295 DWORD MessageLength
, DWORD Style
, DWORD Timeout
, DWORD
*pResponse
, BOOL bWait
)
297 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
);
301 /************************************************************
302 * WTSSendMessageW (WTSAPI32.@)
304 BOOL WINAPI
WTSSendMessageW(HANDLE hServer
, DWORD SessionId
, LPWSTR pTitle
, DWORD TitleLength
, LPWSTR pMessage
,
305 DWORD MessageLength
, DWORD Style
, DWORD Timeout
, DWORD
*pResponse
, BOOL bWait
)
307 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
);
311 /************************************************************
312 * WTSSetUserConfigA (WTSAPI32.@)
314 BOOL WINAPI
WTSSetUserConfigA(LPSTR pServerName
, LPSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPSTR pBuffer
, DWORD DataLength
)
316 FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_a(pServerName
), debugstr_a(pUserName
), WTSConfigClass
,pBuffer
, DataLength
);
320 /************************************************************
321 * WTSSetUserConfigW (WTSAPI32.@)
323 BOOL WINAPI
WTSSetUserConfigW(LPWSTR pServerName
, LPWSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPWSTR pBuffer
, DWORD DataLength
)
325 FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_w(pServerName
), debugstr_w(pUserName
), WTSConfigClass
,pBuffer
, DataLength
);
329 /************************************************************
330 * WTSShutdownSystem (WTSAPI32.@)
332 BOOL WINAPI
WTSShutdownSystem(HANDLE hServer
, DWORD ShutdownFlag
)
334 FIXME("Stub %p 0x%08x\n", hServer
,ShutdownFlag
);
338 /************************************************************
339 * WTSStartRemoteControlSessionA (WTSAPI32.@)
341 BOOL WINAPI
WTSStartRemoteControlSessionA(LPSTR pTargetServerName
, ULONG TargetLogonId
, BYTE HotkeyVk
, USHORT HotkeyModifiers
)
343 FIXME("Stub (%s) %d %d %d\n", debugstr_a(pTargetServerName
), TargetLogonId
, HotkeyVk
, HotkeyModifiers
);
347 /************************************************************
348 * WTSStartRemoteControlSessionW (WTSAPI32.@)
350 BOOL WINAPI
WTSStartRemoteControlSessionW(LPWSTR pTargetServerName
, ULONG TargetLogonId
, BYTE HotkeyVk
, USHORT HotkeyModifiers
)
352 FIXME("Stub (%s) %d %d %d\n", debugstr_w(pTargetServerName
), TargetLogonId
, HotkeyVk
, HotkeyModifiers
);
356 /************************************************************
357 * WTSStopRemoteControlSession (WTSAPI32.@)
359 BOOL WINAPI
WTSStopRemoteControlSession(ULONG LogonId
)
361 FIXME("Stub %d\n", LogonId
);
365 /************************************************************
366 * WTSTerminateProcess (WTSAPI32.@)
368 BOOL WINAPI
WTSTerminateProcess(HANDLE hServer
, DWORD ProcessId
, DWORD ExitCode
)
370 FIXME("Stub %p %d %d\n", hServer
, ProcessId
, ExitCode
);
374 /************************************************************
375 * WTSUnRegisterSessionNotification (WTSAPI32.@)
377 BOOL WINAPI
WTSUnRegisterSessionNotification(HWND hWnd
)
379 FIXME("Stub %p\n", hWnd
);
383 /************************************************************
384 * WTSUnRegisterSessionNotification (WTSAPI32.@)
386 BOOL WINAPI
WTSUnRegisterSessionNotificationEx(HANDLE hServer
, HWND hWnd
)
388 FIXME("Stub %p %p\n", hServer
, hWnd
);
393 /************************************************************
394 * WTSVirtualChannelClose (WTSAPI32.@)
396 BOOL WINAPI
WTSVirtualChannelClose(HANDLE hChannelHandle
)
398 FIXME("Stub %p\n", hChannelHandle
);
402 /************************************************************
403 * WTSVirtualChannelOpen (WTSAPI32.@)
405 HANDLE WINAPI
WTSVirtualChannelOpen(HANDLE hServer
, DWORD SessionId
, LPSTR pVirtualName
)
407 FIXME("Stub %p %d (%s)\n", hServer
, SessionId
, debugstr_a(pVirtualName
));
411 /************************************************************
412 * WTSVirtualChannelOpen (WTSAPI32.@)
414 HANDLE WINAPI
WTSVirtualChannelOpenEx(DWORD SessionId
, LPSTR pVirtualName
, DWORD flags
)
416 FIXME("Stub %d (%s) %d\n", SessionId
, debugstr_a(pVirtualName
), flags
);
420 /************************************************************
421 * WTSVirtualChannelPurgeInput (WTSAPI32.@)
423 BOOL WINAPI
WTSVirtualChannelPurgeInput(HANDLE hChannelHandle
)
425 FIXME("Stub %p\n", hChannelHandle
);
429 /************************************************************
430 * WTSVirtualChannelPurgeOutput (WTSAPI32.@)
432 BOOL WINAPI
WTSVirtualChannelPurgeOutput(HANDLE hChannelHandle
)
434 FIXME("Stub %p\n", hChannelHandle
);
439 /************************************************************
440 * WTSVirtualChannelQuery (WTSAPI32.@)
442 BOOL WINAPI
WTSVirtualChannelQuery(HANDLE hChannelHandle
, WTS_VIRTUAL_CLASS WtsVirtualClass
, PVOID
*ppBuffer
, DWORD
*pBytesReturned
)
444 FIXME("Stub %p %d %p %p\n", hChannelHandle
, WtsVirtualClass
, ppBuffer
, pBytesReturned
);
448 /************************************************************
449 * WTSVirtualChannelRead (WTSAPI32.@)
451 BOOL WINAPI
WTSVirtualChannelRead(HANDLE hChannelHandle
, ULONG TimeOut
, PCHAR Buffer
, ULONG BufferSize
, PULONG pBytesRead
)
453 FIXME("Stub %p %d %p %d %p\n", hChannelHandle
, TimeOut
, Buffer
, BufferSize
, pBytesRead
);
457 /************************************************************
458 * WTSVirtualChannelWrite (WTSAPI32.@)
460 BOOL WINAPI
WTSVirtualChannelWrite(HANDLE hChannelHandle
, PCHAR Buffer
, ULONG Length
, PULONG pBytesWritten
)
462 FIXME("Stub %p %p %d %p\n", hChannelHandle
, Buffer
, Length
, pBytesWritten
);
466 /************************************************************
467 * WTSWaitSystemEvent (WTSAPI32.@)
469 BOOL WINAPI
WTSWaitSystemEvent(HANDLE hServer
, DWORD Mask
, DWORD
* Flags
)
471 /* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */
472 FIXME("Stub %p 0x%08x %p\n", hServer
, Mask
, Flags
);