ole32: Avoid a deadlock when a being loaded DLL calls CoRegisterClassObject from...
[wine.git] / dlls / wtsapi32 / wtsapi32.c
blobc25f75beefb82b03b02047bd921a3a28ca9ec836
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);
29 BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
31 TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
33 switch (fdwReason) {
34 case DLL_PROCESS_ATTACH:
36 DisableThreadLibraryCalls(hinstDLL);
37 break;
39 case DLL_PROCESS_DETACH:
41 break;
45 return TRUE;
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);
62 return TRUE;
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);
71 return TRUE;
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);
80 return TRUE;
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;
94 *pCount = 0;
95 *ppProcessInfo = NULL;
97 return TRUE;
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;
111 *pCount = 0;
112 *ppProcessInfo = NULL;
114 return TRUE;
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);
123 return FALSE;
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);
132 return FALSE;
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;
147 *pCount = 0;
148 *ppSessionInfo = NULL;
150 return TRUE;
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;
164 *pCount = 0;
165 *ppSessionInfo = NULL;
167 return TRUE;
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);
185 return FALSE;
188 /************************************************************
189 * WTSOpenServerA (WTSAPI32.@)
191 HANDLE WINAPI WTSOpenServerA(LPSTR pServerName)
193 FIXME("(%s) stub\n", debugstr_a(pServerName));
194 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
195 return NULL;
198 /************************************************************
199 * WTSOpenServerW (WTSAPI32.@)
201 HANDLE WINAPI WTSOpenServerW(LPWSTR pServerName)
203 FIXME("(%s) stub\n", debugstr_w(pServerName));
204 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
205 return NULL;
208 /************************************************************
209 * WTSQuerySessionInformationA (WTSAPI32.@)
211 BOOL WINAPI WTSQuerySessionInformationA(
212 HANDLE hServer,
213 DWORD SessionId,
214 WTS_INFO_CLASS WTSInfoClass,
215 LPSTR* Buffer,
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);
222 return FALSE;
225 /************************************************************
226 * WTSQuerySessionInformationW (WTSAPI32.@)
228 BOOL WINAPI WTSQuerySessionInformationW(
229 HANDLE hServer,
230 DWORD SessionId,
231 WTS_INFO_CLASS WTSInfoClass,
232 LPWSTR* Buffer,
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);
239 return FALSE;
242 /************************************************************
243 * WTSQueryUserToken (WTSAPI32.@)
245 BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token)
247 FIXME("%u %p\n", session_id, token);
248 return FALSE;
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);
258 return FALSE;
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);
268 return FALSE;
272 /************************************************************
273 * WTSRegisterSessionNotification (WTSAPI32.@)
275 BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags)
277 FIXME("Stub %p 0x%08x\n", hWnd, dwFlags);
278 return TRUE;
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);
287 return FALSE;
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);
298 return FALSE;
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);
308 return FALSE;
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);
317 return FALSE;
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);
326 return FALSE;
329 /************************************************************
330 * WTSShutdownSystem (WTSAPI32.@)
332 BOOL WINAPI WTSShutdownSystem(HANDLE hServer, DWORD ShutdownFlag)
334 FIXME("Stub %p 0x%08x\n", hServer,ShutdownFlag);
335 return FALSE;
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);
344 return FALSE;
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);
353 return FALSE;
356 /************************************************************
357 * WTSStopRemoteControlSession (WTSAPI32.@)
359 BOOL WINAPI WTSStopRemoteControlSession(ULONG LogonId)
361 FIXME("Stub %d\n", LogonId);
362 return FALSE;
365 /************************************************************
366 * WTSTerminateProcess (WTSAPI32.@)
368 BOOL WINAPI WTSTerminateProcess(HANDLE hServer, DWORD ProcessId, DWORD ExitCode)
370 FIXME("Stub %p %d %d\n", hServer, ProcessId, ExitCode);
371 return FALSE;
374 /************************************************************
375 * WTSUnRegisterSessionNotification (WTSAPI32.@)
377 BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd)
379 FIXME("Stub %p\n", hWnd);
380 return FALSE;
383 /************************************************************
384 * WTSUnRegisterSessionNotification (WTSAPI32.@)
386 BOOL WINAPI WTSUnRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd)
388 FIXME("Stub %p %p\n", hServer, hWnd);
389 return FALSE;
393 /************************************************************
394 * WTSVirtualChannelClose (WTSAPI32.@)
396 BOOL WINAPI WTSVirtualChannelClose(HANDLE hChannelHandle)
398 FIXME("Stub %p\n", hChannelHandle);
399 return FALSE;
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));
408 return NULL;
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);
417 return NULL;
420 /************************************************************
421 * WTSVirtualChannelPurgeInput (WTSAPI32.@)
423 BOOL WINAPI WTSVirtualChannelPurgeInput(HANDLE hChannelHandle)
425 FIXME("Stub %p\n", hChannelHandle);
426 return FALSE;
429 /************************************************************
430 * WTSVirtualChannelPurgeOutput (WTSAPI32.@)
432 BOOL WINAPI WTSVirtualChannelPurgeOutput(HANDLE hChannelHandle)
434 FIXME("Stub %p\n", hChannelHandle);
435 return FALSE;
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);
445 return FALSE;
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);
454 return FALSE;
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);
463 return FALSE;
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);
473 return FALSE;