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
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
);
35 case DLL_PROCESS_ATTACH
:
37 DisableThreadLibraryCalls(hinstDLL
);
38 WTSAPI32_hModule
= hinstDLL
;
41 case DLL_PROCESS_DETACH
:
50 /************************************************************
51 * WTSCloseServer (WTSAPI32.@)
53 void WINAPI
WTSCloseServer(HANDLE hServer
)
55 FIXME("Stub %p\n", hServer
);
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 * WTSEnumerateProcessesA (WTSAPI32.@)
70 BOOL WINAPI
WTSEnumerateProcessesA(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
71 PWTS_PROCESS_INFOA
* ppProcessInfo
, DWORD
* pCount
)
73 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
74 ppProcessInfo
, pCount
);
76 if (!ppProcessInfo
|| !pCount
) return FALSE
;
79 *ppProcessInfo
= NULL
;
84 /************************************************************
85 * WTSEnumerateProcessesW (WTSAPI32.@)
87 BOOL WINAPI
WTSEnumerateProcessesW(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
88 PWTS_PROCESS_INFOW
* ppProcessInfo
, DWORD
* pCount
)
90 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
91 ppProcessInfo
, pCount
);
93 if (!ppProcessInfo
|| !pCount
) return FALSE
;
96 *ppProcessInfo
= NULL
;
101 /************************************************************
102 * WTSEnumerateEnumerateSessionsA (WTSAPI32.@)
104 BOOL WINAPI
WTSEnumerateSessionsA(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
105 PWTS_SESSION_INFOA
* ppSessionInfo
, DWORD
* pCount
)
107 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
108 ppSessionInfo
, pCount
);
110 if (!ppSessionInfo
|| !pCount
) return FALSE
;
113 *ppSessionInfo
= NULL
;
118 /************************************************************
119 * WTSEnumerateEnumerateSessionsW (WTSAPI32.@)
121 BOOL WINAPI
WTSEnumerateSessionsW(HANDLE hServer
, DWORD Reserved
, DWORD Version
,
122 PWTS_SESSION_INFOW
* ppSessionInfo
, DWORD
* pCount
)
124 FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer
, Reserved
, Version
,
125 ppSessionInfo
, pCount
);
127 if (!ppSessionInfo
|| !pCount
) return FALSE
;
130 *ppSessionInfo
= NULL
;
135 /************************************************************
136 * WTSFreeMemory (WTSAPI32.@)
138 void WINAPI
WTSFreeMemory(PVOID pMemory
)
140 FIXME("Stub %p\n", pMemory
);
144 /************************************************************
145 * WTSLogoffSession (WTSAPI32.@)
147 BOOL WINAPI
WTSLogoffSession(HANDLE hserver
, DWORD session_id
, BOOL bwait
)
149 FIXME("(%p, 0x%x, %d): stub\n", hserver
, session_id
, bwait
);
150 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
154 /************************************************************
155 * WTSOpenServerA (WTSAPI32.@)
157 HANDLE WINAPI
WTSOpenServerA(LPSTR pServerName
)
159 FIXME("(%s) stub\n", debugstr_a(pServerName
));
160 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
164 /************************************************************
165 * WTSOpenServerW (WTSAPI32.@)
167 HANDLE WINAPI
WTSOpenServerW(LPWSTR pServerName
)
169 FIXME("(%s) stub\n", debugstr_w(pServerName
));
170 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
174 /************************************************************
175 * WTSQuerySessionInformationA (WTSAPI32.@)
177 BOOL WINAPI
WTSQuerySessionInformationA(
180 WTS_INFO_CLASS WTSInfoClass
,
182 DWORD
* BytesReturned
)
184 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */
185 FIXME("Stub %p 0x%08x %d %p %p\n", hServer
, SessionId
, WTSInfoClass
,
186 Buffer
, BytesReturned
);
191 /************************************************************
192 * WTSQuerySessionInformationW (WTSAPI32.@)
194 BOOL WINAPI
WTSQuerySessionInformationW(
197 WTS_INFO_CLASS WTSInfoClass
,
199 DWORD
* BytesReturned
)
201 /* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */
202 FIXME("Stub %p 0x%08x %d %p %p\n", hServer
, SessionId
, WTSInfoClass
,
203 Buffer
, BytesReturned
);
208 /************************************************************
209 * WTSWaitSystemEvent (WTSAPI32.@)
211 BOOL WINAPI
WTSWaitSystemEvent(HANDLE hServer
, DWORD Mask
, DWORD
* Flags
)
213 /* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */
214 FIXME("Stub %p 0x%08x %p\n", hServer
, Mask
, Flags
);
218 /************************************************************
219 * WTSRegisterSessionNotification (WTSAPI32.@)
221 BOOL WINAPI
WTSRegisterSessionNotification(HWND hWnd
, DWORD dwFlags
)
223 FIXME("Stub %p 0x%08x\n", hWnd
, dwFlags
);
227 /************************************************************
228 * WTSUnRegisterSessionNotification (WTSAPI32.@)
230 BOOL WINAPI
WTSUnRegisterSessionNotification(HWND hWnd
)
232 FIXME("Stub %p\n", hWnd
);
236 /************************************************************
237 * WTSQueryUserToken (WTSAPI32.@)
239 BOOL WINAPI
WTSQueryUserToken(ULONG session_id
, PHANDLE token
)
241 FIXME("%u %p\n", session_id
, token
);