WTSAPI32

Ulrich Czekalla ulrich.czekalla at utoronto.ca
Thu Jan 20 10:35:53 CST 2005


ChangeLog:
        Ulrich Czekalla <ulrich at codeweavers.com>
        Add WTSAPI32.DLL
-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.333
diff -u -p -r1.333 configure.ac
--- configure.ac	10 Jan 2005 13:26:33 -0000	1.333
+++ configure.ac	20 Jan 2005 16:30:31 -0000
@@ -1701,6 +1701,7 @@ dlls/wintab32/Makefile
 dlls/wintrust/Makefile
 dlls/wow32/Makefile
 dlls/wsock32/Makefile
+dlls/wtsapi32/Makefile
 dlls/x11drv/Makefile
 documentation/Makefile
 fonts/Makefile
Index: dlls/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/Makefile.in,v
retrieving revision 1.228
diff -u -p -r1.228 Makefile.in
--- dlls/Makefile.in	4 Nov 2004 21:15:33 -0000	1.228
+++ dlls/Makefile.in	20 Jan 2005 16:30:31 -0000
@@ -162,7 +162,8 @@ BASEDIRS = \
 	wintab32 \
 	wintrust \
 	wow32 \
-	wsock32
+	wsock32 \
+	wtsapi32
 
 SUBDIRS = \
 	$(BASEDIRS) \
@@ -394,7 +395,8 @@ SYMLINKS_SO = \
 	wnaspi32.dll.so \
 	wow32.dll.so \
 	ws2_32.dll.so \
-	wsock32.dll.so
+	wsock32.dll.so \
+	wtsapi32.dll.so
 
 # Main target
 
@@ -960,6 +962,9 @@ winsock.dll.so : ws2_32.dll.so
 wsock32.dll.so: wsock32/wsock32.dll.so
 	$(RM) $@ && $(LN_S) wsock32/wsock32.dll.so $@
 
+wtsapi32.dll.so: wtsapi32/wtsapi32.dll.so
+	$(RM) $@ && $(LN_S) wtsapi32/wtsapi32.dll.so $@
+
 x11drv.dll.so: x11drv/x11drv.dll.so
 	$(RM) $@ && $(LN_S) x11drv/x11drv.dll.so $@
 
@@ -1747,6 +1752,11 @@ libwsock32.def: wsock32/wsock32.spec.def
 libwsock32.a: wsock32/wsock32.spec.def
 	$(DLLTOOL) -k -l $@ -d wsock32/wsock32.spec.def
 
+libwtsapi32.def: wtsapi32/wtsapi32.spec.def
+	$(RM) $@ && $(LN_S) wtsapi32/wtsapi32.spec.def $@
+libwtsapi32.a: wtsapi32/wtsapi32.spec.def
+	$(DLLTOOL) -k -l $@ -d wtsapi32/wtsapi32.spec.def
+
 libx11drv.def: x11drv/x11drv.spec.def
 	$(RM) $@ && $(LN_S) x11drv/x11drv.spec.def $@
 libx11drv.a: x11drv/x11drv.spec.def
@@ -1878,6 +1888,7 @@ winaspi/wnaspi32.spec.def: $(WINEBUILD)
 wow32/wow32.spec.def: $(WINEBUILD)
 winsock/ws2_32.spec.def: $(WINEBUILD)
 wsock32/wsock32.spec.def: $(WINEBUILD)
+wstsapi32/wstsapi32.spec.def: $(WINEBUILD)
 x11drv/x11drv.spec.def: $(WINEBUILD)
 
 $(BUILDSUBDIRS): $(IMPORT_LIBS)
@@ -2040,6 +2051,7 @@ winaspi/wnaspi32.dll.so: winaspi
 wow32/wow32.dll.so: wow32
 winsock/ws2_32.dll.so: winsock
 wsock32/wsock32.dll.so: wsock32
+wtsapi32/wtsapi32.dll.so: wtsapi32
 x11drv/x11drv.dll.so: x11drv
 dxerr8/libdxerr8.a: dxerr8
 dxerr9/libdxerr9.a: dxerr9
--- /dev/null	2004-09-14 13:56:30.000000000 -0400
+++ dlls/wtsapi32/Makefile.in	2005-01-20 10:57:45.000000000 -0500
@@ -0,0 +1,14 @@
+EXTRADEFS =
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = wtsapi32.dll
+IMPORTS   = kernel32
+
+C_SRCS = \
+	wtsapi32.c
+
+ at MAKE_DLL_RULES@
+
+### Dependencies:
--- /dev/null	2004-09-14 13:56:30.000000000 -0400
+++ dlls/wtsapi32/wtsapi32.c	2005-01-20 10:57:45.000000000 -0500
@@ -0,0 +1,77 @@
+/* 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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);
+
+HMODULE WTSAPI32_hModule = 0;
+
+BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+    TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
+
+    switch (fdwReason) {
+        case DLL_PROCESS_ATTACH:
+        {
+            DisableThreadLibraryCalls(hinstDLL);
+            WTSAPI32_hModule = hinstDLL;
+            break;
+        }
+        case DLL_PROCESS_DETACH:
+        {
+            break;
+        }
+    }
+
+    return TRUE;
+}
+
+
+/************************************************************
+ *                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%08lx %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%08lx %p\n", hServer, Mask, Flags);
+    return FALSE;
+}
--- /dev/null	2004-09-14 13:56:30.000000000 -0400
+++ dlls/wtsapi32/wtsapi32.spec	2005-01-20 10:57:45.000000000 -0500
@@ -0,0 +1,32 @@
+@ stub WTSCloseServer
+@ stub WTSDisconnectSession
+@ stub WTSEnumerateProcessA
+@ stub WTSEnumerateProcessW
+@ stub WTSEnumerateServersA
+@ stub WTSEnumerateServersW
+@ stub WTSEnumerateSessionsA
+@ stub WTSEnumerateSessionsW
+@ stub WTSFreeMemory
+@ stub WTSLogoffSession
+@ stub WTSOpenServerA
+@ stub WTSOpenServerW
+@ stub WTSQuerySessionInformationA
+@ 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)
--- /dev/null	2004-09-14 13:56:30.000000000 -0400
+++ include/wtsapi32.h	2005-01-20 10:57:45.000000000 -0500
@@ -0,0 +1,72 @@
+/*
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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;
+
+
+BOOL WINAPI WTSQuerySessionInformationW(
+    HANDLE hServer,
+    DWORD SessionId,
+    WTS_INFO_CLASS WTSInfoClass,
+    LPWSTR * Buffer,
+    DWORD * BytesReturned
+    );
+
+BOOL WINAPI WTSQuerySessionInformationA(
+    HANDLE hServer,
+    DWORD SessionId,
+    WTS_INFO_CLASS WTSInfoClass,
+    LPSTR * Buffer,
+    DWORD * BytesReturned
+    );
+#define WTSQuerySessionInformation WINELIB_NAME_AW(WTSQuerySessionInformation)
+
+BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD Mask, DWORD* Flags);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif


More information about the wine-patches mailing list