dplayx: Introduce impl_from_IDirectPlayLobby3A().
[wine] / dlls / wtsapi32 / wtsapi32.c
1 /* Copyright 2005 Ulrich Czekalla
2  *
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.
7  *
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.
12  *
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
16  */
17
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"
25
26 WINE_DEFAULT_DEBUG_CHANNEL(wtsapi);
27
28
29 /************************************************************
30  *                WTSCloseServer  (WTSAPI32.@)
31  */
32 void WINAPI WTSCloseServer(HANDLE hServer)
33 {
34     FIXME("Stub %p\n", hServer);
35 }
36
37 /************************************************************
38  *                WTSConnectSessionA  (WTSAPI32.@)
39  */
40 BOOL WINAPI WTSConnectSessionA(ULONG LogonId, ULONG TargetLogonId, PSTR pPassword, BOOL bWait)
41 {
42    FIXME("Stub %d %d (%s) %d\n", LogonId, TargetLogonId, debugstr_a(pPassword), bWait);
43    return TRUE;
44 }
45
46 /************************************************************
47  *                WTSConnectSessionW  (WTSAPI32.@)
48  */
49 BOOL WINAPI WTSConnectSessionW(ULONG LogonId, ULONG TargetLogonId, PWSTR pPassword, BOOL bWait)
50 {
51    FIXME("Stub %d %d (%s) %d\n", LogonId, TargetLogonId, debugstr_w(pPassword), bWait);
52    return TRUE;
53 }
54
55 /************************************************************
56  *                WTSDisconnectSession  (WTSAPI32.@)
57  */
58 BOOL WINAPI WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait)
59 {
60     FIXME("Stub %p 0x%08x %d\n", hServer, SessionId, bWait);
61     return TRUE;
62 }
63
64 /************************************************************
65  *                WTSEnumerateProcessesA  (WTSAPI32.@)
66  */
67 BOOL WINAPI WTSEnumerateProcessesA(HANDLE hServer, DWORD Reserved, DWORD Version,
68     PWTS_PROCESS_INFOA* ppProcessInfo, DWORD* pCount)
69 {
70     FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
71           ppProcessInfo, pCount);
72
73     if (!ppProcessInfo || !pCount) return FALSE;
74
75     *pCount = 0;
76     *ppProcessInfo = NULL;
77
78     return TRUE;
79 }
80
81 /************************************************************
82  *                WTSEnumerateProcessesW  (WTSAPI32.@)
83  */
84 BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version,
85     PWTS_PROCESS_INFOW* ppProcessInfo, DWORD* pCount)
86 {
87     FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
88           ppProcessInfo, pCount);
89
90     if (!ppProcessInfo || !pCount) return FALSE;
91
92     *pCount = 0;
93     *ppProcessInfo = NULL;
94
95     return TRUE;
96 }
97
98 /************************************************************
99  *                WTSEnumerateServersA  (WTSAPI32.@)
100  */
101 BOOL WINAPI WTSEnumerateServersA(LPSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOA *ppServerInfo, DWORD *pCount)
102 {
103     FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_a(pDomainName), Reserved, Version, ppServerInfo, pCount);
104     return FALSE;
105 }
106
107 /************************************************************
108  *                WTSEnumerateServersW  (WTSAPI32.@)
109  */
110 BOOL WINAPI WTSEnumerateServersW(LPWSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOW *ppServerInfo, DWORD *pCount)
111 {
112     FIXME("Stub %s 0x%08x 0x%08x %p %p\n", debugstr_w(pDomainName), Reserved, Version, ppServerInfo, pCount);
113     return FALSE;
114 }
115
116
117 /************************************************************
118  *                WTSEnumerateEnumerateSessionsA  (WTSAPI32.@)
119  */
120 BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version,
121     PWTS_SESSION_INFOA* ppSessionInfo, DWORD* pCount)
122 {
123     FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
124           ppSessionInfo, pCount);
125
126     if (!ppSessionInfo || !pCount) return FALSE;
127
128     *pCount = 0;
129     *ppSessionInfo = NULL;
130
131     return TRUE;
132 }
133
134 /************************************************************
135  *                WTSEnumerateEnumerateSessionsW  (WTSAPI32.@)
136  */
137 BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version,
138     PWTS_SESSION_INFOW* ppSessionInfo, DWORD* pCount)
139 {
140     FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
141           ppSessionInfo, pCount);
142
143     if (!ppSessionInfo || !pCount) return FALSE;
144
145     *pCount = 0;
146     *ppSessionInfo = NULL;
147
148     return TRUE;
149 }
150
151 /************************************************************
152  *                WTSFreeMemory (WTSAPI32.@)
153  */
154 void WINAPI WTSFreeMemory(PVOID pMemory)
155 {
156     FIXME("Stub %p\n", pMemory);
157 }
158
159 /************************************************************
160  *                WTSLogoffSession (WTSAPI32.@)
161  */
162 BOOL WINAPI WTSLogoffSession(HANDLE hserver, DWORD session_id, BOOL bwait)
163 {
164     FIXME("(%p, 0x%x, %d): stub\n", hserver, session_id, bwait);
165     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
166     return FALSE;
167 }
168
169 /************************************************************
170  *                WTSOpenServerA (WTSAPI32.@)
171  */
172 HANDLE WINAPI WTSOpenServerA(LPSTR pServerName)
173 {
174     FIXME("(%s) stub\n", debugstr_a(pServerName));
175     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
176     return NULL;
177 }
178
179 /************************************************************
180  *                WTSOpenServerW (WTSAPI32.@)
181  */
182 HANDLE WINAPI WTSOpenServerW(LPWSTR pServerName)
183 {
184     FIXME("(%s) stub\n", debugstr_w(pServerName));
185     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
186     return NULL;
187 }
188
189 /************************************************************
190  *                WTSQuerySessionInformationA  (WTSAPI32.@)
191  */
192 BOOL WINAPI WTSQuerySessionInformationA(
193     HANDLE hServer,
194     DWORD SessionId,
195     WTS_INFO_CLASS WTSInfoClass,
196     LPSTR* Buffer,
197     DWORD* BytesReturned)
198 {
199     /* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */
200     FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
201         Buffer, BytesReturned);
202
203     return FALSE;
204 }
205
206 /************************************************************
207  *                WTSQuerySessionInformationW  (WTSAPI32.@)
208  */
209 BOOL WINAPI WTSQuerySessionInformationW(
210     HANDLE hServer,
211     DWORD SessionId,
212     WTS_INFO_CLASS WTSInfoClass,
213     LPWSTR* Buffer,
214     DWORD* BytesReturned)
215 {
216     /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */
217     FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
218         Buffer, BytesReturned);
219
220     return FALSE;
221 }
222
223 /************************************************************
224  *                WTSQueryUserToken (WTSAPI32.@)
225  */
226 BOOL WINAPI WTSQueryUserToken(ULONG session_id, PHANDLE token)
227 {
228     FIXME("%u %p\n", session_id, token);
229     return FALSE;
230 }
231
232 /************************************************************
233  *                WTSQueryUserConfigA (WTSAPI32.@)
234  */
235 BOOL WINAPI WTSQueryUserConfigA(LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR *ppBuffer, DWORD *pBytesReturned)
236 {
237    FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_a(pServerName), debugstr_a(pUserName), WTSConfigClass,
238         ppBuffer, pBytesReturned);
239    return FALSE;
240 }
241
242 /************************************************************
243  *                WTSQueryUserConfigW (WTSAPI32.@)
244  */
245 BOOL WINAPI WTSQueryUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR *ppBuffer, DWORD *pBytesReturned)
246 {
247    FIXME("Stub (%s) (%s) 0x%08x %p %p\n", debugstr_w(pServerName), debugstr_w(pUserName), WTSConfigClass,
248         ppBuffer, pBytesReturned);
249    return FALSE;
250 }
251
252
253 /************************************************************
254  *                WTSRegisterSessionNotification (WTSAPI32.@)
255  */
256 BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags)
257 {
258     FIXME("Stub %p 0x%08x\n", hWnd, dwFlags);
259     return TRUE;
260 }
261
262 /************************************************************
263  *                WTSRegisterSessionNotification (WTSAPI32.@)
264  */
265 BOOL WINAPI WTSRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd, DWORD dwFlags)
266 {
267     FIXME("Stub %p %p 0x%08x\n", hServer, hWnd, dwFlags);
268     return FALSE;
269 }
270
271
272 /************************************************************
273  *                WTSSendMessageA (WTSAPI32.@)
274  */
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)
277 {
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;
280 }
281
282 /************************************************************
283  *                WTSSendMessageW (WTSAPI32.@)
284  */
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)
287 {
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;
290 }
291
292 /************************************************************
293  *                WTSSetUserConfigA (WTSAPI32.@)
294  */
295 BOOL WINAPI WTSSetUserConfigA(LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR pBuffer, DWORD DataLength)
296 {
297    FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_a(pServerName), debugstr_a(pUserName), WTSConfigClass,pBuffer, DataLength);
298    return FALSE;
299 }
300
301 /************************************************************
302  *                WTSSetUserConfigW (WTSAPI32.@)
303  */
304 BOOL WINAPI WTSSetUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR pBuffer, DWORD DataLength)
305 {
306    FIXME("Stub (%s) (%s) 0x%08x %p %d\n", debugstr_w(pServerName), debugstr_w(pUserName), WTSConfigClass,pBuffer, DataLength);
307    return FALSE;
308 }
309
310 /************************************************************
311  *                WTSShutdownSystem (WTSAPI32.@)
312  */
313 BOOL WINAPI WTSShutdownSystem(HANDLE hServer, DWORD ShutdownFlag)
314 {
315    FIXME("Stub %p 0x%08x\n", hServer,ShutdownFlag);
316    return FALSE;
317 }
318
319 /************************************************************
320  *                WTSStartRemoteControlSessionA (WTSAPI32.@)
321  */
322 BOOL WINAPI WTSStartRemoteControlSessionA(LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers)
323 {
324    FIXME("Stub (%s) %d %d %d\n", debugstr_a(pTargetServerName), TargetLogonId, HotkeyVk, HotkeyModifiers);
325    return FALSE;
326 }
327
328 /************************************************************
329  *                WTSStartRemoteControlSessionW (WTSAPI32.@)
330  */
331 BOOL WINAPI WTSStartRemoteControlSessionW(LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers)
332 {
333    FIXME("Stub (%s) %d %d %d\n", debugstr_w(pTargetServerName), TargetLogonId, HotkeyVk, HotkeyModifiers);
334    return FALSE;
335 }
336
337 /************************************************************
338  *                WTSStopRemoteControlSession (WTSAPI32.@)
339  */
340 BOOL WINAPI WTSStopRemoteControlSession(ULONG LogonId)
341 {
342    FIXME("Stub %d\n",  LogonId);
343    return FALSE;
344 }
345
346 /************************************************************
347  *                WTSTerminateProcess (WTSAPI32.@)
348  */
349 BOOL WINAPI WTSTerminateProcess(HANDLE hServer, DWORD ProcessId, DWORD ExitCode)
350 {
351    FIXME("Stub %p %d %d\n", hServer, ProcessId, ExitCode);
352    return FALSE;
353 }
354
355 /************************************************************
356  *                WTSUnRegisterSessionNotification (WTSAPI32.@)
357  */
358 BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd)
359 {
360     FIXME("Stub %p\n", hWnd);
361     return FALSE;
362 }
363
364 /************************************************************
365  *                WTSUnRegisterSessionNotification (WTSAPI32.@)
366  */
367 BOOL WINAPI WTSUnRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd)
368 {
369     FIXME("Stub %p %p\n", hServer, hWnd);
370     return FALSE;
371 }
372
373
374 /************************************************************
375  *                WTSVirtualChannelClose (WTSAPI32.@)
376  */
377 BOOL WINAPI WTSVirtualChannelClose(HANDLE hChannelHandle)
378 {
379    FIXME("Stub %p\n", hChannelHandle);
380    return FALSE;
381 }
382
383 /************************************************************
384  *                WTSVirtualChannelOpen (WTSAPI32.@)
385  */
386 HANDLE WINAPI WTSVirtualChannelOpen(HANDLE hServer, DWORD SessionId, LPSTR pVirtualName)
387 {
388    FIXME("Stub %p %d (%s)\n", hServer, SessionId, debugstr_a(pVirtualName));
389    return NULL;
390 }
391
392 /************************************************************
393  *                WTSVirtualChannelOpen (WTSAPI32.@)
394  */
395 HANDLE WINAPI WTSVirtualChannelOpenEx(DWORD SessionId, LPSTR pVirtualName, DWORD flags)
396 {
397    FIXME("Stub %d (%s) %d\n",  SessionId, debugstr_a(pVirtualName), flags);
398    return NULL;
399 }
400
401 /************************************************************
402  *                WTSVirtualChannelPurgeInput (WTSAPI32.@)
403  */
404 BOOL WINAPI WTSVirtualChannelPurgeInput(HANDLE hChannelHandle)
405 {
406    FIXME("Stub %p\n", hChannelHandle);
407    return FALSE;
408 }
409
410 /************************************************************
411  *                WTSVirtualChannelPurgeOutput (WTSAPI32.@)
412  */
413 BOOL WINAPI WTSVirtualChannelPurgeOutput(HANDLE hChannelHandle)
414 {
415    FIXME("Stub %p\n", hChannelHandle);
416    return FALSE;
417 }
418
419
420 /************************************************************
421  *                WTSVirtualChannelQuery (WTSAPI32.@)
422  */
423 BOOL WINAPI WTSVirtualChannelQuery(HANDLE hChannelHandle, WTS_VIRTUAL_CLASS WtsVirtualClass, PVOID *ppBuffer, DWORD *pBytesReturned)
424 {
425    FIXME("Stub %p %d %p %p\n", hChannelHandle, WtsVirtualClass, ppBuffer, pBytesReturned);
426    return FALSE;
427 }
428
429 /************************************************************
430  *                WTSVirtualChannelRead (WTSAPI32.@)
431  */
432 BOOL WINAPI WTSVirtualChannelRead(HANDLE hChannelHandle, ULONG TimeOut, PCHAR Buffer, ULONG BufferSize, PULONG pBytesRead)
433 {
434    FIXME("Stub %p %d %p %d %p\n", hChannelHandle, TimeOut, Buffer, BufferSize, pBytesRead);
435    return FALSE;
436 }
437
438 /************************************************************
439  *                WTSVirtualChannelWrite (WTSAPI32.@)
440  */
441 BOOL WINAPI WTSVirtualChannelWrite(HANDLE hChannelHandle, PCHAR Buffer, ULONG Length, PULONG pBytesWritten)
442 {
443    FIXME("Stub %p %p %d %p\n", hChannelHandle, Buffer, Length, pBytesWritten);
444    return FALSE;
445 }
446
447 /************************************************************
448  *                WTSWaitSystemEvent (WTSAPI32.@)
449  */
450 BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD Mask, DWORD* Flags)
451 {
452     /* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */
453     FIXME("Stub %p 0x%08x %p\n", hServer, Mask, Flags);
454     return FALSE;
455 }