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
22 #define WIN32_NO_STATUS
25 #include <wine/winternl.h>
27 #include <wine/debug.h>
29 WINE_DEFAULT_DEBUG_CHANNEL(wtsapi
);
32 /************************************************************
33 * WTSCloseServer (WTSAPI32.@)
35 void WINAPI
WTSCloseServer(HANDLE hServer
)
37 FIXME("Stub %p\n", hServer
);
40 /************************************************************
41 * WTSConnectSessionA (WTSAPI32.@)
43 BOOL WINAPI
WTSConnectSessionA(ULONG LogonId
, ULONG TargetLogonId
, PSTR pPassword
, BOOL bWait
)
45 FIXME("Stub %d %d (%s) %d\n", LogonId
, TargetLogonId
, debugstr_a(pPassword
), bWait
);
49 /************************************************************
50 * WTSConnectSessionW (WTSAPI32.@)
52 BOOL WINAPI
WTSConnectSessionW(ULONG LogonId
, ULONG TargetLogonId
, PWSTR pPassword
, BOOL bWait
)
54 FIXME("Stub %d %d (%s) %d\n", LogonId
, TargetLogonId
, debugstr_w(pPassword
), bWait
);
58 /************************************************************
59 * WTSDisconnectSession (WTSAPI32.@)
61 BOOL WINAPI
WTSDisconnectSession(HANDLE hServer
, DWORD SessionId
, BOOL bWait
)
63 FIXME("Stub %p 0x%08x %d\n", hServer
, SessionId
, bWait
);
67 /************************************************************
68 * WTSEnableChildSessions (WTSAPI32.@)
70 BOOL WINAPI
WTSEnableChildSessions(BOOL enable
)
72 FIXME("Stub %d\n", enable
);
76 /************************************************************
77 * WTSEnumerateProcessesA (WTSAPI32.@)
79 BOOL WINAPI
WTSEnumerateProcessesA(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
80 PWTS_PROCESS_INFOA
* ppProcessInfo
, DWORD
* pCount
)
82 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
83 ppProcessInfo
, pCount
);
85 if (!ppProcessInfo
|| !pCount
) return FALSE
;
88 *ppProcessInfo
= NULL
;
93 /************************************************************
94 * WTSEnumerateProcessesW (WTSAPI32.@)
96 BOOL WINAPI
WTSEnumerateProcessesW(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
97 PWTS_PROCESS_INFOW
* ppProcessInfo
, DWORD
* pCount
)
99 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
100 ppProcessInfo
, pCount
);
102 if (!ppProcessInfo
|| !pCount
|| Reserved
!= 0 || Version
!= 1)
104 SetLastError(ERROR_INVALID_PARAMETER
);
109 *ppProcessInfo
= NULL
;
114 /************************************************************
115 * WTSEnumerateServersA (WTSAPI32.@)
117 BOOL WINAPI
WTSEnumerateServersA(LPSTR pDomainName
, DWORD Reserved
, DWORD Version
, PWTS_SERVER_INFOA
*ppServerInfo
, DWORD
*pCount
)
119 FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_a(pDomainName
), Reserved
, Version
, ppServerInfo
, pCount
);
123 /************************************************************
124 * WTSEnumerateServersW (WTSAPI32.@)
126 BOOL WINAPI
WTSEnumerateServersW(LPWSTR pDomainName
, DWORD Reserved
, DWORD Version
, PWTS_SERVER_INFOW
*ppServerInfo
, DWORD
*pCount
)
128 FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_w(pDomainName
), Reserved
, Version
, ppServerInfo
, pCount
);
133 /************************************************************
134 * WTSEnumerateEnumerateSessionsA (WTSAPI32.@)
136 BOOL WINAPI
WTSEnumerateSessionsA(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
137 PWTS_SESSION_INFOA
* ppSessionInfo
, DWORD
* pCount
)
141 if (!once
++) FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
142 ppSessionInfo
, pCount
);
144 if (!ppSessionInfo
|| !pCount
) return FALSE
;
147 *ppSessionInfo
= NULL
;
152 /************************************************************
153 * WTSEnumerateEnumerateSessionsW (WTSAPI32.@)
155 BOOL WINAPI
WTSEnumerateSessionsW(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
156 PWTS_SESSION_INFOW
* ppSessionInfo
, DWORD
* pCount
)
158 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
159 ppSessionInfo
, pCount
);
161 if (!ppSessionInfo
|| !pCount
) return FALSE
;
164 *ppSessionInfo
= NULL
;
169 /************************************************************
170 * WTSFreeMemory (WTSAPI32.@)
172 void WINAPI
WTSFreeMemory(PVOID pMemory
)
176 if (!once
++) FIXME("Stub %p\n", pMemory
);
179 /************************************************************
180 * WTSLogoffSession (WTSAPI32.@)
182 BOOL WINAPI
WTSLogoffSession(HANDLE hserver
, DWORD session_id
, BOOL bwait
)
184 FIXME("(%p, 0x%x, %d): stub\n", hserver
, session_id
, bwait
);
185 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
189 /************************************************************
190 * WTSOpenServerA (WTSAPI32.@)
192 HANDLE WINAPI
WTSOpenServerA(LPSTR pServerName
)
194 FIXME("(%s) stub\n", debugstr_a(pServerName
));
195 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
199 /************************************************************
200 * WTSOpenServerW (WTSAPI32.@)
202 HANDLE WINAPI
WTSOpenServerW(LPWSTR pServerName
)
204 FIXME("(%s) stub\n", debugstr_w(pServerName
));
205 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
209 /************************************************************
210 * WTSQuerySessionInformationA (WTSAPI32.@)
212 BOOL WINAPI
WTSQuerySessionInformationA(
215 WTS_INFO_CLASS WTSInfoClass
,
217 DWORD
* BytesReturned
)
219 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */
220 FIXME("Stub %p 0x%08x %d %p %p\n", hServer
, SessionId
, WTSInfoClass
,
221 Buffer
, BytesReturned
);
226 /************************************************************
227 * WTSQuerySessionInformationW (WTSAPI32.@)
229 BOOL WINAPI
WTSQuerySessionInformationW(
232 WTS_INFO_CLASS WTSInfoClass
,
234 DWORD
* BytesReturned
)
236 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */
237 FIXME("Stub %p 0x%08x %d %p %p\n", hServer
, SessionId
, WTSInfoClass
,
238 Buffer
, BytesReturned
);
243 /************************************************************
244 * WTSQueryUserToken (WTSAPI32.@)
246 BOOL WINAPI
WTSQueryUserToken(ULONG session_id
, PHANDLE token
)
248 FIXME("%u %p\n", session_id
, token
);
252 /************************************************************
253 * WTSQueryUserConfigA (WTSAPI32.@)
255 BOOL WINAPI
WTSQueryUserConfigA(LPSTR pServerName
, LPSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPSTR
*ppBuffer
, DWORD
*pBytesReturned
)
257 FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_a(pServerName
), debugstr_a(pUserName
), WTSConfigClass
,
258 ppBuffer
, pBytesReturned
);
262 /************************************************************
263 * WTSQueryUserConfigW (WTSAPI32.@)
265 BOOL WINAPI
WTSQueryUserConfigW(LPWSTR pServerName
, LPWSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPWSTR
*ppBuffer
, DWORD
*pBytesReturned
)
267 FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_w(pServerName
), debugstr_w(pUserName
), WTSConfigClass
,
268 ppBuffer
, pBytesReturned
);
273 /************************************************************
274 * WTSRegisterSessionNotification (WTSAPI32.@)
276 BOOL WINAPI
WTSRegisterSessionNotification(HWND hWnd
, DWORD dwFlags
)
278 FIXME("Stub %p 0x%08x\n", hWnd
, dwFlags
);
282 /************************************************************
283 * WTSRegisterSessionNotificationEx (WTSAPI32.@)
285 BOOL WINAPI
WTSRegisterSessionNotificationEx(HANDLE hServer
, HWND hWnd
, DWORD dwFlags
)
287 FIXME("Stub %p %p 0x%08x\n", hServer
, hWnd
, dwFlags
);
292 /************************************************************
293 * WTSSendMessageA (WTSAPI32.@)
295 BOOL WINAPI
WTSSendMessageA(HANDLE hServer
, DWORD SessionId
, LPSTR pTitle
, DWORD TitleLength
, LPSTR pMessage
,
296 DWORD MessageLength
, DWORD Style
, DWORD Timeout
, DWORD
*pResponse
, BOOL bWait
)
298 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
);
302 /************************************************************
303 * WTSSendMessageW (WTSAPI32.@)
305 BOOL WINAPI
WTSSendMessageW(HANDLE hServer
, DWORD SessionId
, LPWSTR pTitle
, DWORD TitleLength
, LPWSTR pMessage
,
306 DWORD MessageLength
, DWORD Style
, DWORD Timeout
, DWORD
*pResponse
, BOOL bWait
)
308 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
);
312 /************************************************************
313 * WTSSetUserConfigA (WTSAPI32.@)
315 BOOL WINAPI
WTSSetUserConfigA(LPSTR pServerName
, LPSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPSTR pBuffer
, DWORD DataLength
)
317 FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_a(pServerName
), debugstr_a(pUserName
), WTSConfigClass
,pBuffer
, DataLength
);
321 /************************************************************
322 * WTSSetUserConfigW (WTSAPI32.@)
324 BOOL WINAPI
WTSSetUserConfigW(LPWSTR pServerName
, LPWSTR pUserName
, WTS_CONFIG_CLASS WTSConfigClass
, LPWSTR pBuffer
, DWORD DataLength
)
326 FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_w(pServerName
), debugstr_w(pUserName
), WTSConfigClass
,pBuffer
, DataLength
);
330 /************************************************************
331 * WTSShutdownSystem (WTSAPI32.@)
333 BOOL WINAPI
WTSShutdownSystem(HANDLE hServer
, DWORD ShutdownFlag
)
335 FIXME("Stub %p 0x%08x\n", hServer
,ShutdownFlag
);
339 /************************************************************
340 * WTSStartRemoteControlSessionA (WTSAPI32.@)
342 BOOL WINAPI
WTSStartRemoteControlSessionA(LPSTR pTargetServerName
, ULONG TargetLogonId
, BYTE HotkeyVk
, USHORT HotkeyModifiers
)
344 FIXME("Stub (%s) %d %d %d\n", debugstr_a(pTargetServerName
), TargetLogonId
, HotkeyVk
, HotkeyModifiers
);
348 /************************************************************
349 * WTSStartRemoteControlSessionW (WTSAPI32.@)
351 BOOL WINAPI
WTSStartRemoteControlSessionW(LPWSTR pTargetServerName
, ULONG TargetLogonId
, BYTE HotkeyVk
, USHORT HotkeyModifiers
)
353 FIXME("Stub (%s) %d %d %d\n", debugstr_w(pTargetServerName
), TargetLogonId
, HotkeyVk
, HotkeyModifiers
);
357 /************************************************************
358 * WTSStopRemoteControlSession (WTSAPI32.@)
360 BOOL WINAPI
WTSStopRemoteControlSession(ULONG LogonId
)
362 FIXME("Stub %d\n", LogonId
);
366 /************************************************************
367 * WTSTerminateProcess (WTSAPI32.@)
369 BOOL WINAPI
WTSTerminateProcess(HANDLE hServer
, DWORD ProcessId
, DWORD ExitCode
)
371 FIXME("Stub %p %d %d\n", hServer
, ProcessId
, ExitCode
);
375 /************************************************************
376 * WTSUnRegisterSessionNotification (WTSAPI32.@)
378 BOOL WINAPI
WTSUnRegisterSessionNotification(HWND hWnd
)
380 FIXME("Stub %p\n", hWnd
);
384 /************************************************************
385 * WTSUnRegisterSessionNotification (WTSAPI32.@)
387 BOOL WINAPI
WTSUnRegisterSessionNotificationEx(HANDLE hServer
, HWND hWnd
)
389 FIXME("Stub %p %p\n", hServer
, hWnd
);
394 /************************************************************
395 * WTSVirtualChannelClose (WTSAPI32.@)
397 BOOL WINAPI
WTSVirtualChannelClose(HANDLE hChannelHandle
)
399 FIXME("Stub %p\n", hChannelHandle
);
403 /************************************************************
404 * WTSVirtualChannelOpen (WTSAPI32.@)
406 HANDLE WINAPI
WTSVirtualChannelOpen(HANDLE hServer
, DWORD SessionId
, LPSTR pVirtualName
)
408 FIXME("Stub %p %d (%s)\n", hServer
, SessionId
, debugstr_a(pVirtualName
));
412 /************************************************************
413 * WTSVirtualChannelOpen (WTSAPI32.@)
415 HANDLE WINAPI
WTSVirtualChannelOpenEx(DWORD SessionId
, LPSTR pVirtualName
, DWORD flags
)
417 FIXME("Stub %d (%s) %d\n", SessionId
, debugstr_a(pVirtualName
), flags
);
421 /************************************************************
422 * WTSVirtualChannelPurgeInput (WTSAPI32.@)
424 BOOL WINAPI
WTSVirtualChannelPurgeInput(HANDLE hChannelHandle
)
426 FIXME("Stub %p\n", hChannelHandle
);
430 /************************************************************
431 * WTSVirtualChannelPurgeOutput (WTSAPI32.@)
433 BOOL WINAPI
WTSVirtualChannelPurgeOutput(HANDLE hChannelHandle
)
435 FIXME("Stub %p\n", hChannelHandle
);
440 /************************************************************
441 * WTSVirtualChannelQuery (WTSAPI32.@)
443 BOOL WINAPI
WTSVirtualChannelQuery(HANDLE hChannelHandle
, WTS_VIRTUAL_CLASS WtsVirtualClass
, PVOID
*ppBuffer
, DWORD
*pBytesReturned
)
445 FIXME("Stub %p %d %p %p\n", hChannelHandle
, WtsVirtualClass
, ppBuffer
, pBytesReturned
);
449 /************************************************************
450 * WTSVirtualChannelRead (WTSAPI32.@)
452 BOOL WINAPI
WTSVirtualChannelRead(HANDLE hChannelHandle
, ULONG TimeOut
, PCHAR Buffer
, ULONG BufferSize
, PULONG pBytesRead
)
454 FIXME("Stub %p %d %p %d %p\n", hChannelHandle
, TimeOut
, Buffer
, BufferSize
, pBytesRead
);
458 /************************************************************
459 * WTSVirtualChannelWrite (WTSAPI32.@)
461 BOOL WINAPI
WTSVirtualChannelWrite(HANDLE hChannelHandle
, PCHAR Buffer
, ULONG Length
, PULONG pBytesWritten
)
463 FIXME("Stub %p %p %d %p\n", hChannelHandle
, Buffer
, Length
, pBytesWritten
);
467 /************************************************************
468 * WTSWaitSystemEvent (WTSAPI32.@)
470 BOOL WINAPI
WTSWaitSystemEvent(HANDLE hServer
, DWORD Mask
, DWORD
* Flags
)
472 /* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */
473 FIXME("Stub %p 0x%08x %p\n", hServer
, Mask
, Flags
);