imm32: Fix ImmGetDescription behavior with a null HKL.
[wine/multimedia.git] / dlls / wtsapi32 / wtsapi32.c
blob898b95d1476d304d0506c9ef96fa054cb6dea35d
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 /************************************************************
30 * WTSCloseServer (WTSAPI32.@)
32 void WINAPI WTSCloseServer(HANDLE hServer)
34 FIXME("Stub %p\n", hServer);
37 /************************************************************
38 * WTSConnectSessionA (WTSAPI32.@)
40 BOOL WINAPI WTSConnectSessionA(ULONG LogonId, ULONG TargetLogonId, PSTR pPassword, BOOL bWait)
42 FIXME("Stub %d %d (%s) %d\n", LogonId, TargetLogonId, debugstr_a(pPassword), bWait);
43 return TRUE;
46 /************************************************************
47 * WTSConnectSessionW (WTSAPI32.@)
49 BOOL WINAPI WTSConnectSessionW(ULONG LogonId, ULONG TargetLogonId, PWSTR pPassword, BOOL bWait)
51 FIXME("Stub %d %d (%s) %d\n", LogonId, TargetLogonId, debugstr_w(pPassword), bWait);
52 return TRUE;
55 /************************************************************
56 * WTSDisconnectSession (WTSAPI32.@)
58 BOOL WINAPI WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait)
60 FIXME("Stub %p 0x%08x %d\n", hServer, SessionId, bWait);
61 return TRUE;
64 /************************************************************
65 * WTSEnumerateProcessesA (WTSAPI32.@)
67 BOOL WINAPI WTSEnumerateProcessesA(HANDLE hServer, DWORD Reserved, DWORD Version,
68 PWTS_PROCESS_INFOA* ppProcessInfo, DWORD* pCount)
70 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
71 ppProcessInfo, pCount);
73 if (!ppProcessInfo || !pCount) return FALSE;
75 *pCount = 0;
76 *ppProcessInfo = NULL;
78 return TRUE;
81 /************************************************************
82 * WTSEnumerateProcessesW (WTSAPI32.@)
84 BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version,
85 PWTS_PROCESS_INFOW* ppProcessInfo, DWORD* pCount)
87 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
88 ppProcessInfo, pCount);
90 if (!ppProcessInfo || !pCount) return FALSE;
92 *pCount = 0;
93 *ppProcessInfo = NULL;
95 return TRUE;
98 /************************************************************
99 * WTSEnumerateServersA (WTSAPI32.@)
101 BOOL WINAPI WTSEnumerateServersA(LPSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOA *ppServerInfo, DWORD *pCount)
103 FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_a(pDomainName), Reserved, Version, ppServerInfo, pCount);
104 return FALSE;
107 /************************************************************
108 * WTSEnumerateServersW (WTSAPI32.@)
110 BOOL WINAPI WTSEnumerateServersW(LPWSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOW *ppServerInfo, DWORD *pCount)
112 FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_w(pDomainName), Reserved, Version, ppServerInfo, pCount);
113 return FALSE;
117 /************************************************************
118 * WTSEnumerateEnumerateSessionsA (WTSAPI32.@)
120 BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version,
121 PWTS_SESSION_INFOA* ppSessionInfo, DWORD* pCount)
123 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
124 ppSessionInfo, pCount);
126 if (!ppSessionInfo || !pCount) return FALSE;
128 *pCount = 0;
129 *ppSessionInfo = NULL;
131 return TRUE;
134 /************************************************************
135 * WTSEnumerateEnumerateSessionsW (WTSAPI32.@)
137 BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version,
138 PWTS_SESSION_INFOW* ppSessionInfo, DWORD* pCount)
140 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
141 ppSessionInfo, pCount);
143 if (!ppSessionInfo || !pCount) return FALSE;
145 *pCount = 0;
146 *ppSessionInfo = NULL;
148 return TRUE;
151 /************************************************************
152 * WTSFreeMemory (WTSAPI32.@)
154 void WINAPI WTSFreeMemory(PVOID pMemory)
156 FIXME("Stub %p\n", pMemory);
159 /************************************************************
160 * WTSLogoffSession (WTSAPI32.@)
162 BOOL WINAPI WTSLogoffSession(HANDLE hserver, DWORD session_id, BOOL bwait)
164 FIXME("(%p, 0x%x, %d): stub\n", hserver, session_id, bwait);
165 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
166 return FALSE;
169 /************************************************************
170 * WTSOpenServerA (WTSAPI32.@)
172 HANDLE WINAPI WTSOpenServerA(LPSTR pServerName)
174 FIXME("(%s) stub\n", debugstr_a(pServerName));
175 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
176 return NULL;
179 /************************************************************
180 * WTSOpenServerW (WTSAPI32.@)
182 HANDLE WINAPI WTSOpenServerW(LPWSTR pServerName)
184 FIXME("(%s) stub\n", debugstr_w(pServerName));
185 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
186 return NULL;
189 /************************************************************
190 * WTSQuerySessionInformationA (WTSAPI32.@)
192 BOOL WINAPI WTSQuerySessionInformationA(
193 HANDLE hServer,
194 DWORD SessionId,
195 WTS_INFO_CLASS WTSInfoClass,
196 LPSTR* Buffer,
197 DWORD* BytesReturned)
199 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */
200 FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
201 Buffer, BytesReturned);
203 return FALSE;
206 /************************************************************
207 * WTSQuerySessionInformationW (WTSAPI32.@)
209 BOOL WINAPI WTSQuerySessionInformationW(
210 HANDLE hServer,
211 DWORD SessionId,
212 WTS_INFO_CLASS WTSInfoClass,
213 LPWSTR* Buffer,
214 DWORD* BytesReturned)
216 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */
217 FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
218 Buffer, BytesReturned);
220 return FALSE;
223 /************************************************************
224 * WTSQueryUserToken (WTSAPI32.@)
226 BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token)
228 FIXME("%u %p\n", session_id, token);
229 return FALSE;
232 /************************************************************
233 * WTSQueryUserConfigA (WTSAPI32.@)
235 BOOL WINAPI WTSQueryUserConfigA(LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR *ppBuffer, DWORD *pBytesReturned)
237 FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_a(pServerName), debugstr_a(pUserName), WTSConfigClass,
238 ppBuffer, pBytesReturned);
239 return FALSE;
242 /************************************************************
243 * WTSQueryUserConfigW (WTSAPI32.@)
245 BOOL WINAPI WTSQueryUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR *ppBuffer, DWORD *pBytesReturned)
247 FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_w(pServerName), debugstr_w(pUserName), WTSConfigClass,
248 ppBuffer, pBytesReturned);
249 return FALSE;
253 /************************************************************
254 * WTSRegisterSessionNotification (WTSAPI32.@)
256 BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags)
258 FIXME("Stub %p 0x%08x\n", hWnd, dwFlags);
259 return TRUE;
262 /************************************************************
263 * WTSRegisterSessionNotification (WTSAPI32.@)
265 BOOL WINAPI WTSRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd, DWORD dwFlags)
267 FIXME("Stub %p %p 0x%08x\n", hServer, hWnd, dwFlags);
268 return FALSE;
272 /************************************************************
273 * WTSSendMessageA (WTSAPI32.@)
275 BOOL WINAPI WTSSendMessageA(HANDLE hServer, DWORD SessionId, LPSTR pTitle, DWORD TitleLength, LPSTR pMessage,
276 DWORD MessageLength, DWORD Style, DWORD Timeout, DWORD *pResponse, BOOL bWait)
278 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);
279 return FALSE;
282 /************************************************************
283 * WTSSendMessageW (WTSAPI32.@)
285 BOOL WINAPI WTSSendMessageW(HANDLE hServer, DWORD SessionId, LPWSTR pTitle, DWORD TitleLength, LPWSTR pMessage,
286 DWORD MessageLength, DWORD Style, DWORD Timeout, DWORD *pResponse, BOOL bWait)
288 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);
289 return FALSE;
292 /************************************************************
293 * WTSSetUserConfigA (WTSAPI32.@)
295 BOOL WINAPI WTSSetUserConfigA(LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR pBuffer, DWORD DataLength)
297 FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_a(pServerName), debugstr_a(pUserName), WTSConfigClass,pBuffer, DataLength);
298 return FALSE;
301 /************************************************************
302 * WTSSetUserConfigW (WTSAPI32.@)
304 BOOL WINAPI WTSSetUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR pBuffer, DWORD DataLength)
306 FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_w(pServerName), debugstr_w(pUserName), WTSConfigClass,pBuffer, DataLength);
307 return FALSE;
310 /************************************************************
311 * WTSShutdownSystem (WTSAPI32.@)
313 BOOL WINAPI WTSShutdownSystem(HANDLE hServer, DWORD ShutdownFlag)
315 FIXME("Stub %p 0x%08x\n", hServer,ShutdownFlag);
316 return FALSE;
319 /************************************************************
320 * WTSStartRemoteControlSessionA (WTSAPI32.@)
322 BOOL WINAPI WTSStartRemoteControlSessionA(LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers)
324 FIXME("Stub (%s) %d %d %d\n", debugstr_a(pTargetServerName), TargetLogonId, HotkeyVk, HotkeyModifiers);
325 return FALSE;
328 /************************************************************
329 * WTSStartRemoteControlSessionW (WTSAPI32.@)
331 BOOL WINAPI WTSStartRemoteControlSessionW(LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers)
333 FIXME("Stub (%s) %d %d %d\n", debugstr_w(pTargetServerName), TargetLogonId, HotkeyVk, HotkeyModifiers);
334 return FALSE;
337 /************************************************************
338 * WTSStopRemoteControlSession (WTSAPI32.@)
340 BOOL WINAPI WTSStopRemoteControlSession(ULONG LogonId)
342 FIXME("Stub %d\n", LogonId);
343 return FALSE;
346 /************************************************************
347 * WTSTerminateProcess (WTSAPI32.@)
349 BOOL WINAPI WTSTerminateProcess(HANDLE hServer, DWORD ProcessId, DWORD ExitCode)
351 FIXME("Stub %p %d %d\n", hServer, ProcessId, ExitCode);
352 return FALSE;
355 /************************************************************
356 * WTSUnRegisterSessionNotification (WTSAPI32.@)
358 BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd)
360 FIXME("Stub %p\n", hWnd);
361 return FALSE;
364 /************************************************************
365 * WTSUnRegisterSessionNotification (WTSAPI32.@)
367 BOOL WINAPI WTSUnRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd)
369 FIXME("Stub %p %p\n", hServer, hWnd);
370 return FALSE;
374 /************************************************************
375 * WTSVirtualChannelClose (WTSAPI32.@)
377 BOOL WINAPI WTSVirtualChannelClose(HANDLE hChannelHandle)
379 FIXME("Stub %p\n", hChannelHandle);
380 return FALSE;
383 /************************************************************
384 * WTSVirtualChannelOpen (WTSAPI32.@)
386 HANDLE WINAPI WTSVirtualChannelOpen(HANDLE hServer, DWORD SessionId, LPSTR pVirtualName)
388 FIXME("Stub %p %d (%s)\n", hServer, SessionId, debugstr_a(pVirtualName));
389 return NULL;
392 /************************************************************
393 * WTSVirtualChannelOpen (WTSAPI32.@)
395 HANDLE WINAPI WTSVirtualChannelOpenEx(DWORD SessionId, LPSTR pVirtualName, DWORD flags)
397 FIXME("Stub %d (%s) %d\n", SessionId, debugstr_a(pVirtualName), flags);
398 return NULL;
401 /************************************************************
402 * WTSVirtualChannelPurgeInput (WTSAPI32.@)
404 BOOL WINAPI WTSVirtualChannelPurgeInput(HANDLE hChannelHandle)
406 FIXME("Stub %p\n", hChannelHandle);
407 return FALSE;
410 /************************************************************
411 * WTSVirtualChannelPurgeOutput (WTSAPI32.@)
413 BOOL WINAPI WTSVirtualChannelPurgeOutput(HANDLE hChannelHandle)
415 FIXME("Stub %p\n", hChannelHandle);
416 return FALSE;
420 /************************************************************
421 * WTSVirtualChannelQuery (WTSAPI32.@)
423 BOOL WINAPI WTSVirtualChannelQuery(HANDLE hChannelHandle, WTS_VIRTUAL_CLASS WtsVirtualClass, PVOID *ppBuffer, DWORD *pBytesReturned)
425 FIXME("Stub %p %d %p %p\n", hChannelHandle, WtsVirtualClass, ppBuffer, pBytesReturned);
426 return FALSE;
429 /************************************************************
430 * WTSVirtualChannelRead (WTSAPI32.@)
432 BOOL WINAPI WTSVirtualChannelRead(HANDLE hChannelHandle, ULONG TimeOut, PCHAR Buffer, ULONG BufferSize, PULONG pBytesRead)
434 FIXME("Stub %p %d %p %d %p\n", hChannelHandle, TimeOut, Buffer, BufferSize, pBytesRead);
435 return FALSE;
438 /************************************************************
439 * WTSVirtualChannelWrite (WTSAPI32.@)
441 BOOL WINAPI WTSVirtualChannelWrite(HANDLE hChannelHandle, PCHAR Buffer, ULONG Length, PULONG pBytesWritten)
443 FIXME("Stub %p %p %d %p\n", hChannelHandle, Buffer, Length, pBytesWritten);
444 return FALSE;
447 /************************************************************
448 * WTSWaitSystemEvent (WTSAPI32.@)
450 BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD Mask, DWORD* Flags)
452 /* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */
453 FIXME("Stub %p 0x%08x %p\n", hServer, Mask, Flags);
454 return FALSE;