mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 14:08:22 +00:00
add wtsapi32.dll from Wine
svn path=/trunk/; revision=26533
This commit is contained in:
parent
dbcf03ede1
commit
1324d35870
7 changed files with 407 additions and 0 deletions
|
@ -110,6 +110,7 @@
|
|||
<property name="BASEADDRESS_CLUSAPI" value="0x76d10000" />
|
||||
<property name="BASEADDRESS_DHCPCSVC" value="0x76d80000" />
|
||||
<property name="BASEADDRESS_FMIFS" value="0x76df0000" />
|
||||
<property name="BASEADDRESS_WTSAPI32" value="0x76f50000" />
|
||||
<property name="BASEADDRESS_MSVFW32" value="0x77400000" />
|
||||
<property name="BASEADDRESS_MSACM32" value="0x77400000" />
|
||||
<property name="BASEADDRESS_CRTDLL" value="0x77630000" />
|
||||
|
|
|
@ -231,6 +231,7 @@ dll\win32\ws2_32\ws2_32.dll 1
|
|||
dll\win32\ws2help\ws2help.dll 1
|
||||
dll\win32\wshirda\wshirda.dll 1
|
||||
dll\win32\wsock32\wsock32.dll 1
|
||||
dll\win32\wtsapi32\wtsapi32.dll 1
|
||||
|
||||
|
||||
; Drivers
|
||||
|
|
|
@ -298,4 +298,7 @@
|
|||
<directory name="wsock32">
|
||||
<xi:include href="wsock32/wsock32.rbuild" />
|
||||
</directory>
|
||||
<directory name="wtsapi32">
|
||||
<xi:include href="wtsapi32/wtsapi32.rbuild" />
|
||||
</directory>
|
||||
</group>
|
206
reactos/dll/win32/wtsapi32/wtsapi32.c
Normal file
206
reactos/dll/win32/wtsapi32/wtsapi32.c
Normal file
|
@ -0,0 +1,206 @@
|
|||
/* Copyright 2005 Ulrich Czekalla
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wtsapi32.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wtsapi);
|
||||
|
||||
static HMODULE WTSAPI32_hModule;
|
||||
|
||||
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
|
||||
|
||||
switch (fdwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
WTSAPI32_hModule = hinstDLL;
|
||||
break;
|
||||
}
|
||||
case DLL_PROCESS_DETACH:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSCloseServer (WTSAPI32.@)
|
||||
*/
|
||||
void WINAPI WTSCloseServer(HANDLE hServer)
|
||||
{
|
||||
FIXME("Stub %p\n", hServer);
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSDisconnectSession (WTSAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait)
|
||||
{
|
||||
FIXME("Stub %p 0x%08x %d\n", hServer, SessionId, bWait);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSEnumerateProcessesA (WTSAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI WTSEnumerateProcessesA(HANDLE hServer, DWORD Reserved, DWORD Version,
|
||||
PWTS_PROCESS_INFOA* ppProcessInfo, DWORD* pCount)
|
||||
{
|
||||
FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
|
||||
ppProcessInfo, pCount);
|
||||
|
||||
if (!ppProcessInfo || !pCount) return FALSE;
|
||||
|
||||
*pCount = 0;
|
||||
*ppProcessInfo = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSEnumerateProcessesW (WTSAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version,
|
||||
PWTS_PROCESS_INFOW* ppProcessInfo, DWORD* pCount)
|
||||
{
|
||||
FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
|
||||
ppProcessInfo, pCount);
|
||||
|
||||
if (!ppProcessInfo || !pCount) return FALSE;
|
||||
|
||||
*pCount = 0;
|
||||
*ppProcessInfo = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSEnumerateEnumerateSessionsA (WTSAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version,
|
||||
PWTS_SESSION_INFOA* ppSessionInfo, DWORD* pCount)
|
||||
{
|
||||
FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
|
||||
ppSessionInfo, pCount);
|
||||
|
||||
if (!ppSessionInfo || !pCount) return FALSE;
|
||||
|
||||
*pCount = 0;
|
||||
*ppSessionInfo = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSEnumerateEnumerateSessionsW (WTSAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version,
|
||||
PWTS_SESSION_INFOW* ppSessionInfo, DWORD* pCount)
|
||||
{
|
||||
FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version,
|
||||
ppSessionInfo, pCount);
|
||||
|
||||
if (!ppSessionInfo || !pCount) return FALSE;
|
||||
|
||||
*pCount = 0;
|
||||
*ppSessionInfo = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSFreeMemory (WTSAPI32.@)
|
||||
*/
|
||||
void WINAPI WTSFreeMemory(PVOID pMemory)
|
||||
{
|
||||
FIXME("Stub %p\n", pMemory);
|
||||
return;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSOpenServerA (WTSAPI32.@)
|
||||
*/
|
||||
HANDLE WINAPI WTSOpenServerA(LPSTR pServerName)
|
||||
{
|
||||
FIXME("(%s) stub\n", debugstr_a(pServerName));
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSOpenServerW (WTSAPI32.@)
|
||||
*/
|
||||
HANDLE WINAPI WTSOpenServerW(LPWSTR pServerName)
|
||||
{
|
||||
FIXME("(%s) stub\n", debugstr_w(pServerName));
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSQuerySessionInformationA (WTSAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI WTSQuerySessionInformationA(
|
||||
HANDLE hServer,
|
||||
DWORD SessionId,
|
||||
WTS_INFO_CLASS WTSInfoClass,
|
||||
LPSTR* Buffer,
|
||||
DWORD* BytesReturned)
|
||||
{
|
||||
/* FIXME: Forward request to winsta.dll::WinStationQueryInformationA */
|
||||
FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
|
||||
Buffer, BytesReturned);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSQuerySessionInformationW (WTSAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI WTSQuerySessionInformationW(
|
||||
HANDLE hServer,
|
||||
DWORD SessionId,
|
||||
WTS_INFO_CLASS WTSInfoClass,
|
||||
LPWSTR* Buffer,
|
||||
DWORD* BytesReturned)
|
||||
{
|
||||
/* FIXME: Forward request to winsta.dll::WinStationQueryInformationW */
|
||||
FIXME("Stub %p 0x%08x %d %p %p\n", hServer, SessionId, WTSInfoClass,
|
||||
Buffer, BytesReturned);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* WTSWaitSystemEvent (WTSAPI32.@)
|
||||
*/
|
||||
BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD Mask, DWORD* Flags)
|
||||
{
|
||||
/* FIXME: Forward request to winsta.dll::WinStationWaitSystemEvent */
|
||||
FIXME("Stub %p 0x%08x %p\n", hServer, Mask, Flags);
|
||||
return FALSE;
|
||||
}
|
32
reactos/dll/win32/wtsapi32/wtsapi32.spec
Normal file
32
reactos/dll/win32/wtsapi32/wtsapi32.spec
Normal file
|
@ -0,0 +1,32 @@
|
|||
@ stdcall WTSCloseServer(long)
|
||||
@ stdcall WTSDisconnectSession(long long long)
|
||||
@ stdcall WTSEnumerateProcessesA(long long long ptr ptr)
|
||||
@ stdcall WTSEnumerateProcessesW(long long long ptr ptr)
|
||||
@ stub WTSEnumerateServersA
|
||||
@ stub WTSEnumerateServersW
|
||||
@ stdcall WTSEnumerateSessionsA(long long long ptr ptr)
|
||||
@ stdcall WTSEnumerateSessionsW(long long long ptr ptr)
|
||||
@ stdcall WTSFreeMemory(ptr)
|
||||
@ stub WTSLogoffSession
|
||||
@ stdcall WTSOpenServerA(ptr)
|
||||
@ stdcall WTSOpenServerW(ptr)
|
||||
@ stdcall WTSQuerySessionInformationA(long long long ptr ptr)
|
||||
@ stdcall WTSQuerySessionInformationW(long long long ptr ptr)
|
||||
@ stub WTSQueryUserConfigA
|
||||
@ stub WTSQueryUserConfigW
|
||||
@ stub WTSSendMessageA
|
||||
@ stub WTSSendMessageW
|
||||
@ stub WTSSetSessionInformationA
|
||||
@ stub WTSSetSessionInformationW
|
||||
@ stub WTSSetUserConfigA
|
||||
@ stub WTSSetUserConfigW
|
||||
@ stub WTSShutdownSystem
|
||||
@ stub WTSTerminateProcess
|
||||
@ stub WTSVirtualChannelClose
|
||||
@ stub WTSVirtualChannelOpen
|
||||
@ stub WTSVirtualChannelPurgeInput
|
||||
@ stub WTSVirtualChannelPurgeOutput
|
||||
@ stub WTSVirtualChannelQuery
|
||||
@ stub WTSVirtualChannelRead
|
||||
@ stub WTSVirtualChannelWrite
|
||||
@ stdcall WTSWaitSystemEvent(long long ptr)
|
163
reactos/include/psdk/wtsapi32.h
Normal file
163
reactos/include/psdk/wtsapi32.h
Normal file
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* Copyright 2005 Ulrich Czekalla (For CodeWeavers)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WTSAPI32_H
|
||||
#define __WINE_WTSAPI32_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef enum tagWTS_INFO_CLASS
|
||||
{
|
||||
WTSInitialProgram,
|
||||
WTSApplicationName,
|
||||
WTSWorkingDirectory,
|
||||
WTSOEMId,
|
||||
WTSSessionId,
|
||||
WTSUserName,
|
||||
WTSWinStationName,
|
||||
WTSDomainName,
|
||||
WTSConnectState,
|
||||
WTSClientBuildNumber,
|
||||
WTSClientName,
|
||||
WTSClientDirectory,
|
||||
WTSClientProductId,
|
||||
WTSClientHardwareId,
|
||||
WTSClientAddress,
|
||||
WTSClientDisplay,
|
||||
WTSClientProtocolType,
|
||||
} WTS_INFO_CLASS;
|
||||
|
||||
typedef enum _WTS_CONNECTSTATE_CLASS
|
||||
{
|
||||
WTSActive,
|
||||
WTSConnected,
|
||||
WTSConnectQuery,
|
||||
WTSShadow,
|
||||
WTSDisconnected,
|
||||
WTSIdle,
|
||||
WTSListen,
|
||||
WTSReset,
|
||||
WTSDown,
|
||||
WTSInit
|
||||
} WTS_CONNECTSTATE_CLASS;
|
||||
|
||||
typedef enum _WTS_CONFIG_CLASS
|
||||
{
|
||||
WTSUserConfigInitialProgram,
|
||||
WTSUserConfigWorkingDirectory,
|
||||
WTSUserConfigInheritInitialProgram,
|
||||
WTSUserConfigAllowLogonTerminalServer,
|
||||
WTSUserConfigTimeoutSettingsConnections,
|
||||
WTSUserConfigTimeoutSettingsDisconnections,
|
||||
WTSUserConfigTimeoutSettingsIdle,
|
||||
WTSUserConfigDeviceClientDrives,
|
||||
WTSUserConfigDeviceClientPrinters,
|
||||
WTSUserConfigDeviceClientDefaultPrinter,
|
||||
WTSUserConfigBrokenTimeoutSettings,
|
||||
WTSUserConfigModemCallbackSettings,
|
||||
WTSUserConfigModemCallbackPhoneNumber,
|
||||
WTSUserConfigShadowSettings,
|
||||
WTSUserConfigTerminalServerProfilePath,
|
||||
WTSUserConfigTerminalServerHomeDirectory,
|
||||
WTSUserConfigfTerminalServerRemoteHomeDir
|
||||
} WTS_CONFIG_CLASS;
|
||||
|
||||
typedef struct _WTS_PROCESS_INFOA
|
||||
{
|
||||
DWORD SessionId;
|
||||
DWORD ProcessId;
|
||||
LPSTR pProcessName;
|
||||
PSID pUserSid;
|
||||
} WTS_PROCESS_INFOA, *PWTS_PROCESS_INFOA;
|
||||
|
||||
typedef struct _WTS_PROCESS_INFOW
|
||||
{
|
||||
DWORD SessionId;
|
||||
DWORD ProcessId;
|
||||
LPWSTR pProcessName;
|
||||
PSID pUserSid;
|
||||
} WTS_PROCESS_INFOW, *PWTS_PROCESS_INFOW;
|
||||
|
||||
DECL_WINELIB_TYPE_AW(WTS_PROCESS_INFO)
|
||||
DECL_WINELIB_TYPE_AW(PWTS_PROCESS_INFO)
|
||||
|
||||
typedef struct _WTS_SESSION_INFOA
|
||||
{
|
||||
DWORD SessionId;
|
||||
LPSTR pWinStationName;
|
||||
WTS_CONNECTSTATE_CLASS State;
|
||||
} WTS_SESSION_INFOA, *PWTS_SESSION_INFOA;
|
||||
|
||||
typedef struct _WTS_SESSION_INFOW
|
||||
{
|
||||
DWORD SessionId;
|
||||
LPWSTR pWinStationName;
|
||||
WTS_CONNECTSTATE_CLASS State;
|
||||
} WTS_SESSION_INFOW, *PWTS_SESSION_INFOW;
|
||||
|
||||
DECL_WINELIB_TYPE_AW(WTS_SESSION_INFO)
|
||||
DECL_WINELIB_TYPE_AW(PWTS_SESSION_INFO)
|
||||
|
||||
typedef struct _WTS_SERVER_INFOA
|
||||
{
|
||||
LPSTR pServerName;
|
||||
} WTS_SERVER_INFOA, *PWTS_SERVER_INFOA;
|
||||
|
||||
typedef struct _WTS_SERVER_INFOW
|
||||
{
|
||||
LPWSTR pServerName;
|
||||
} WTS_SERVER_INFOW, *PWTS_SERVER_INFOW;
|
||||
|
||||
DECL_WINELIB_TYPE_AW(WTS_SERVER_INFO)
|
||||
DECL_WINELIB_TYPE_AW(PWTS_SERVER_INFO)
|
||||
|
||||
void WINAPI WTSCloseServer(HANDLE);
|
||||
BOOL WINAPI WTSDisconnectSession(HANDLE, DWORD, BOOL);
|
||||
BOOL WINAPI WTSEnumerateProcessesA(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOA *, DWORD *);
|
||||
BOOL WINAPI WTSEnumerateProcessesW(HANDLE, DWORD, DWORD, PWTS_PROCESS_INFOW *, DWORD *);
|
||||
#define WTSEnumerateProcesses WINELIB_NAME_AW(WTSEnumerateProcesses)
|
||||
BOOL WINAPI WTSEnumerateServersA( LPSTR, DWORD, DWORD, PWTS_SERVER_INFOA*, DWORD*);
|
||||
BOOL WINAPI WTSEnumerateServersW( LPWSTR, DWORD, DWORD, PWTS_SERVER_INFOW*, DWORD*);
|
||||
#define WTSEnumerateServers WINELIB_NAME_AW(WTSEnumerateServers)
|
||||
BOOL WINAPI WTSEnumerateSessionsA(HANDLE, DWORD, DWORD, PWTS_SESSION_INFOA *, DWORD *);
|
||||
BOOL WINAPI WTSEnumerateSessionsW(HANDLE, DWORD, DWORD, PWTS_SESSION_INFOW *, DWORD *);
|
||||
#define WTSEnumerateSessions WINELIB_NAME_AW(WTSEnumerateSessions)
|
||||
void WINAPI WTSFreeMemory(PVOID);
|
||||
HANDLE WINAPI WTSOpenServerA(LPSTR);
|
||||
HANDLE WINAPI WTSOpenServerW(LPWSTR);
|
||||
#define WTSOpenServer WINELIB_NAME_AW(WTSOpenServer)
|
||||
BOOL WINAPI WTSQuerySessionInformationA(HANDLE, DWORD, WTS_INFO_CLASS, LPSTR *, DWORD *);
|
||||
BOOL WINAPI WTSQuerySessionInformationW(HANDLE, DWORD, WTS_INFO_CLASS, LPWSTR *, DWORD *);
|
||||
#define WTSQuerySessionInformation WINELIB_NAME_AW(WTSQuerySessionInformation)
|
||||
BOOL WINAPI WTSQueryUserConfigA(LPSTR,LPSTR,WTS_CONFIG_CLASS,LPSTR*,DWORD*);
|
||||
BOOL WINAPI WTSQueryUserConfigW(LPWSTR,LPWSTR,WTS_CONFIG_CLASS,LPWSTR*,DWORD*);
|
||||
#define WTSQueryUserConfig WINELIB_NAME_AW(WTSQueryUserConfig)
|
||||
BOOL WINAPI WTSQueryUserToken(ULONG, PHANDLE);
|
||||
BOOL WINAPI WTSRegisterSessionNotification(HWND, DWORD);
|
||||
BOOL WINAPI WTSTerminateProcess(HANDLE, DWORD, DWORD);
|
||||
BOOL WINAPI WTSUnRegisterSessionNotification(HWND);
|
||||
BOOL WINAPI WTSWaitSystemEvent(HANDLE, DWORD, DWORD*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -88,6 +88,7 @@ reactos/dll/win32/winmm # Forked at Wine-20050628
|
|||
reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
|
||||
reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628
|
||||
reactos/dll/win32/wldap32 # Autosync
|
||||
reactos/dll/win32/wtsapi32 # Autosync
|
||||
reactos/dll/directx/dinput # Synced to Wine-0_9_5
|
||||
reactos/dll/directx/dinput8 # Synced to Wine-0_9_5
|
||||
reactos/dll/directx/dplay # Synced to Wine-0_9_5
|
||||
|
|
Loading…
Reference in a new issue