winex11: Multiply the error tolerance by the table caused error magnification.
[wine/multimedia.git] / dlls / wtsapi32 / wtsapi32.c
blobc500b537df29dd78c672c445e4386545ef17b91b
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
18 #include "config.h"
19 #include <stdarg.h>
20 #include <stdlib.h>
21 #include "windef.h"
22 #include "winbase.h"
23 #include "wtsapi32.h"
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);
34 switch (fdwReason) {
35 case DLL_PROCESS_ATTACH:
37 DisableThreadLibraryCalls(hinstDLL);
38 WTSAPI32_hModule = hinstDLL;
39 break;
41 case DLL_PROCESS_DETACH:
43 break;
47 return TRUE;
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);
64 return TRUE;
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);
73 return TRUE;
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);
82 return TRUE;
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;
96 *pCount = 0;
97 *ppProcessInfo = NULL;
99 return TRUE;
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;
113 *pCount = 0;
114 *ppProcessInfo = NULL;
116 return TRUE;
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);
125 return FALSE;
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);
134 return FALSE;
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;
149 *pCount = 0;
150 *ppSessionInfo = NULL;
152 return TRUE;
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;
166 *pCount = 0;
167 *ppSessionInfo = NULL;
169 return TRUE;
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);
187 return FALSE;
190 /************************************************************
191 * WTSOpenServerA (WTSAPI32.@)
193 HANDLE WINAPI WTSOpenServerA(LPSTR pServerName)
195 FIXME("(%s) stub\n", debugstr_a(pServerName));
196 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
197 return NULL;
200 /************************************************************
201 * WTSOpenServerW (WTSAPI32.@)
203 HANDLE WINAPI WTSOpenServerW(LPWSTR pServerName)
205 FIXME("(%s) stub\n", debugstr_w(pServerName));
206 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
207 return NULL;
210 /************************************************************
211 * WTSQuerySessionInformationA (WTSAPI32.@)
213 BOOL WINAPI WTSQuerySessionInformationA(
214 HANDLE hServer,
215 DWORD SessionId,
216 WTS_INFO_CLASS WTSInfoClass,
217 LPSTR* Buffer,
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);
224 return FALSE;
227 /************************************************************
228 * WTSQuerySessionInformationW (WTSAPI32.@)
230 BOOL WINAPI WTSQuerySessionInformationW(
231 HANDLE hServer,
232 DWORD SessionId,
233 WTS_INFO_CLASS WTSInfoClass,
234 LPWSTR* Buffer,
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);
241 return FALSE;
244 /************************************************************
245 * WTSQueryUserToken (WTSAPI32.@)
247 BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token)
249 FIXME("%u %p\n", session_id, token);
250 return FALSE;
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);
260 return FALSE;
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);
270 return FALSE;
274 /************************************************************
275 * WTSRegisterSessionNotification (WTSAPI32.@)
277 BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags)
279 FIXME("Stub %p 0x%08x\n", hWnd, dwFlags);
280 return FALSE;
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);
289 return FALSE;
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);
300 return FALSE;
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);
310 return FALSE;
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);
319 return FALSE;
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);
328 return FALSE;
331 /************************************************************
332 * WTSShutdownSystem (WTSAPI32.@)
334 BOOL WINAPI WTSShutdownSystem(HANDLE hServer, DWORD ShutdownFlag)
336 FIXME("Stub %p 0x%08x\n", hServer,ShutdownFlag);
337 return FALSE;
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);
346 return FALSE;
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);
355 return FALSE;
358 /************************************************************
359 * WTSStopRemoteControlSession (WTSAPI32.@)
361 BOOL WINAPI WTSStopRemoteControlSession(ULONG LogonId)
363 FIXME("Stub %d\n", LogonId);
364 return FALSE;
367 /************************************************************
368 * WTSTerminateProcess (WTSAPI32.@)
370 BOOL WINAPI WTSTerminateProcess(HANDLE hServer, DWORD ProcessId, DWORD ExitCode)
372 FIXME("Stub %p %d %d\n", hServer, ProcessId, ExitCode);
373 return FALSE;
376 /************************************************************
377 * WTSUnRegisterSessionNotification (WTSAPI32.@)
379 BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd)
381 FIXME("Stub %p\n", hWnd);
382 return FALSE;
385 /************************************************************
386 * WTSUnRegisterSessionNotification (WTSAPI32.@)
388 BOOL WINAPI WTSUnRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd)
390 FIXME("Stub %p %p\n", hServer, hWnd);
391 return FALSE;
395 /************************************************************
396 * WTSVirtualChannelClose (WTSAPI32.@)
398 BOOL WINAPI WTSVirtualChannelClose(HANDLE hChannelHandle)
400 FIXME("Stub %p\n", hChannelHandle);
401 return FALSE;
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));
410 return NULL;
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);
419 return NULL;
422 /************************************************************
423 * WTSVirtualChannelPurgeInput (WTSAPI32.@)
425 BOOL WINAPI WTSVirtualChannelPurgeInput(HANDLE hChannelHandle)
427 FIXME("Stub %p\n", hChannelHandle);
428 return FALSE;
431 /************************************************************
432 * WTSVirtualChannelPurgeOutput (WTSAPI32.@)
434 BOOL WINAPI WTSVirtualChannelPurgeOutput(HANDLE hChannelHandle)
436 FIXME("Stub %p\n", hChannelHandle);
437 return FALSE;
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);
447 return FALSE;
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);
456 return FALSE;
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);
465 return FALSE;
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);
475 return FALSE;