clusapi: [RESEND] Implements stub dll for clusapi

Benjamin Arai me at benjaminarai.com
Wed Sep 27 18:02:35 CDT 2006


Hi,

Fixed up previous submission by adding handler for DLL_WINE_PREATTACH.

Fixes bug http://bugs.winehq.org/show_bug.cgi?id=6265

The application for bug 6265 checks if clusapi.dll exists and attempts
to call clusapi:GetNodeClusterState from it.  This patch adds a stub
implementation for the DLL clusapi and GetNodeClusterState.

---
 configure.ac              |    1
 dlls/clusapi/Makefile.in  |   14 +++++
 dlls/clusapi/clusapi.c    |   54 +++++++++++++++++++++
 dlls/clusapi/clusapi.spec |  116 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 185 insertions(+), 0 deletions(-)

Copyright: Google
License: LGPL

-- 
Benjamin Arai
http://www.benjaminarai.com
-------------- next part --------------

diff --git a/configure.ac b/configure.ac
index 0ccb9d3..598441c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1514,6 +1514,7 @@ dlls/cabinet/tests/Makefile
 dlls/capi2032/Makefile
 dlls/cards/Makefile
 dlls/cfgmgr32/Makefile
+dlls/clusapi/Makefile
 dlls/comcat/Makefile
 dlls/comcat/tests/Makefile
 dlls/comctl32/Makefile
diff --git a/dlls/clusapi/Makefile.in b/dlls/clusapi/Makefile.in
new file mode 100644
index 0000000..fdab576
--- /dev/null
+++ b/dlls/clusapi/Makefile.in
@@ -0,0 +1,14 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = clusapi.dll
+IMPORTLIB = libclusapi.$(IMPLIBEXT)
+IMPORTS   = kernel32
+
+C_SRCS = \
+	clusapi.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/dlls/clusapi/clusapi.c b/dlls/clusapi/clusapi.c
new file mode 100644
index 0000000..3e8c573
--- /dev/null
+++ b/dlls/clusapi/clusapi.c
@@ -0,0 +1,54 @@
+/*
+ * clusapi main
+ *
+ * Copyright 2006 Benjamin Arai (Google)
+ *
+ * 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 <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(clusapi);
+
+/***********************************************************************
+ *             GetNodeClusterState   (CLUSAPI.@)
+ *
+ */
+DWORD WINAPI GetNodeClusterState(LPCWSTR lpszNodeName, LPDWORD pdwClusterState)
+{
+    FIXME("(%s,%p) stub!\n",debugstr_w(lpszNodeName),pdwClusterState);
+
+    return 0;
+}
+
+
+/***********************************************************************
+ *             DllMain   (CLUSAPI.@)
+ *
+ */
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+    switch(fdwReason)
+    {
+    case DLL_WINE_PREATTACH:
+        return FALSE;  /* prefer native version */
+    default: break;
+    }
+    return TRUE;
+}
diff --git a/dlls/clusapi/clusapi.spec b/dlls/clusapi/clusapi.spec
new file mode 100644
index 0000000..2f6cad0
--- /dev/null
+++ b/dlls/clusapi/clusapi.spec
@@ -0,0 +1,116 @@
+@ stub AddClusterResourceDependency
+@ stub AddClusterResourceNode
+@ stub BackupClusterDatabase
+@ stub CanResourceBeDependent
+@ stub ChangeClusterResourceGroup
+@ stub CloseCluster
+@ stub CloseClusterGroup
+@ stub CloseClusterNetInterface
+@ stub CloseClusterNetwork
+@ stub CloseClusterNode
+@ stub CloseClusterNotifyPort
+@ stub CloseClusterResource
+@ stub ClusterCloseEnum
+@ stub ClusterControl
+@ stub ClusterEnum
+@ stub ClusterGetEnumCount
+@ stub ClusterGroupCloseEnum
+@ stub ClusterGroupControl
+@ stub ClusterGroupEnum
+@ stub ClusterGroupGetEnumCount
+@ stub ClusterGroupOpenEnum
+@ stub ClusterNetInterfaceControl
+@ stub ClusterNetworkCloseEnum
+@ stub ClusterNetworkControl
+@ stub ClusterNetworkEnum
+@ stub ClusterNetworkGetEnumCount
+@ stub ClusterNetworkOpenEnum
+@ stub ClusterNodeCloseEnum
+@ stub ClusterNodeControl
+@ stub ClusterNodeEnum
+@ stub ClusterNodeGetEnumCount
+@ stub ClusterNodeOpenEnum
+@ stub ClusterOpenEnum
+@ stub ClusterRegCloseKey
+@ stub ClusterRegCreateKey
+@ stub ClusterRegDeleteKey
+@ stub ClusterRegDeleteValue
+@ stub ClusterRegEnumKey
+@ stub ClusterRegEnumValue
+@ stub ClusterRegGetKeySecurity
+@ stub ClusterRegOpenKey
+@ stub ClusterRegQueryInfoKey
+@ stub ClusterRegQueryValue
+@ stub ClusterRegSetKeySecurity
+@ stub ClusterRegSetValue
+@ stub ClusterResourceCloseEnum
+@ stub ClusterResourceControl
+@ stub ClusterResourceEnum
+@ stub ClusterResourceGetEnumCount
+@ stub ClusterResourceOpenEnum
+@ stub ClusterResourceTypeCloseEnum
+@ stub ClusterResourceTypeControl
+@ stub ClusterResourceTypeEnum
+@ stub ClusterResourceTypeGetEnumCount
+@ stub ClusterResourceTypeOpenEnum
+@ stub CreateClusterGroup
+@ stub CreateClusterNotifyPort
+@ stub CreateClusterResource
+@ stub CreateClusterResourceType
+@ stub DeleteClusterGroup
+@ stub DeleteClusterResource
+@ stub DeleteClusterResourceType
+@ stub EvictClusterNode
+@ stub EvictClusterNodeEx
+@ stub FailClusterResource
+@ stub GetClusterFromGroup
+@ stub GetClusterFromNetInterface
+@ stub GetClusterFromNetwork
+@ stub GetClusterFromNode
+@ stub GetClusterFromResource
+@ stub GetClusterGroupKey
+@ stub GetClusterGroupState
+@ stub GetClusterInformation
+@ stub GetClusterKey
+@ stub GetClusterNetInterface
+@ stub GetClusterNetInterfaceKey
+@ stub GetClusterNetInterfaceState
+@ stub GetClusterNetworkId
+@ stub GetClusterNetworkKey
+@ stub GetClusterNetworkState
+@ stub GetClusterNodeId
+@ stub GetClusterNodeKey
+@ stub GetClusterNodeState
+@ stub GetClusterNotify
+@ stub GetClusterQuorumResource
+@ stub GetClusterResourceKey
+@ stub GetClusterResourceNetworkName
+@ stub GetClusterResourceState
+@ stub GetClusterResourceTypeKey
+@ stdcall GetNodeClusterState(wstr ptr)
+@ stub MoveClusterGroup
+@ stub OfflineClusterGroup
+@ stub OfflineClusterResource
+@ stub OnlineClusterGroup
+@ stub OnlineClusterResource
+@ stub OpenCluster
+@ stub OpenClusterGroup
+@ stub OpenClusterNetInterface
+@ stub OpenClusterNetwork
+@ stub OpenClusterNode
+@ stub OpenClusterResource
+@ stub PauseClusterNode
+@ stub RegisterClusterNotify
+@ stub RemoveClusterResourceDependency
+@ stub RemoveClusterResourceNode
+@ stub RestoreClusterDatabase
+@ stub ResumeClusterNode
+@ stub SetClusterGroupName
+@ stub SetClusterGroupNodeList
+@ stub SetClusterName
+@ stub SetClusterNetworkName
+@ stub SetClusterNetworkPriorityOrder
+@ stub SetClusterQuorumResource
+@ stub SetClusterResourceName
+@ stub SetClusterServiceAccountPassword
+@ stdcall -private DllMain(long long ptr)
-- 
1.4.0


More information about the wine-patches mailing list