xref: /reactos/dll/win32/clusapi/clusapi.c (revision 1734f297)
1 /*
2  * clusapi main
3  *
4  * Copyright 2006 Benjamin Arai (Google)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #include <stdarg.h>
22 
23 #include "windef.h"
24 #include "winbase.h"
25 #include "clusapi.h"
26 #include "wine/debug.h"
27 
28 WINE_DEFAULT_DEBUG_CHANNEL(clusapi);
29 
30 /***********************************************************************
31  *             GetClusterInformation   (CLUSAPI.@)
32  *
33  */
34 DWORD WINAPI GetClusterInformation(HCLUSTER hCluster, LPWSTR lpszClusterName,
35                                    LPDWORD lpcchClusterName, LPCLUSTERVERSIONINFO lpClusterInfo)
36 {
37     FIXME("(%p, %p, %p, %p) stub!\n", hCluster, lpszClusterName, lpcchClusterName, lpClusterInfo);
38 
39     *lpcchClusterName = 0;
40 
41     return ERROR_SUCCESS;
42 }
43 
44 /***********************************************************************
45  *             GetNodeClusterState   (CLUSAPI.@)
46  *
47  * PARAMS
48  *   lpszNodeName    [I] Optional Pointer to a NULL terminated unicode string
49  *   pdwClusterState [O] Current state of the cluster
50  *                        0x00 - Cluster not installed.
51  *                        0x01 - Cluster not configured.
52  *                        0x03 - Cluster not running.
53  *                        0x13 - Cluster is running.
54  */
55 DWORD WINAPI GetNodeClusterState(LPCWSTR lpszNodeName, LPDWORD pdwClusterState)
56 {
57     FIXME("(%s,%p) stub!\n",debugstr_w(lpszNodeName),pdwClusterState);
58 
59     *pdwClusterState = 0;
60 
61     return ERROR_SUCCESS;
62 }
63 
64 /***********************************************************************
65  *             OpenCluster   (CLUSAPI.@)
66  *
67  */
68 HCLUSTER WINAPI OpenCluster(LPCWSTR lpszClusterName)
69 {
70     FIXME("(%s) stub!\n", debugstr_w(lpszClusterName));
71 
72     return (HCLUSTER)0xdeadbeef;
73 }
74 
75 /***********************************************************************
76  *             CloseCluster   (CLUSAPI.@)
77  *
78  */
79 BOOL WINAPI CloseCluster(HCLUSTER hCluster)
80 {
81     FIXME("(%p) stub!\n", hCluster);
82 
83     return TRUE;
84 }
85 
86 /***********************************************************************
87  *             ClusterOpenEnum   (CLUSAPI.@)
88  *
89  */
90 HCLUSENUM WINAPI ClusterOpenEnum(HCLUSTER hCluster, DWORD dwType)
91 {
92     FIXME("(%p, %u) stub!\n", hCluster,dwType);
93 
94     return (HCLUSENUM)0xdeadbeef;
95 }
96 
97 /***********************************************************************
98  *             ClusterCloseEnum   (CLUSAPI.@)
99  *
100  */
101 DWORD WINAPI ClusterCloseEnum(HCLUSENUM hEnum)
102 {
103     FIXME("(%p) stub!\n", hEnum);
104 
105     return ERROR_SUCCESS;
106 }
107 
108 /***********************************************************************
109  *             ClusterEnum   (CLUSAPI.@)
110  *
111  */
112 DWORD WINAPI ClusterEnum(HCLUSENUM hEnum, DWORD dwIndex, LPDWORD lpdwType, LPWSTR lpszName, LPDWORD lpcchName)
113 {
114     FIXME("(%p, %u, %p, %p, %u) stub!\n", hEnum, dwIndex, lpdwType, lpszName, *lpcchName);
115 
116     return ERROR_NO_MORE_ITEMS;
117 }
118 
119 /***********************************************************************
120  *             DllMain   (CLUSAPI.@)
121  *
122  */
123 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
124 {
125     switch(fdwReason)
126     {
127     case DLL_WINE_PREATTACH:
128         return FALSE;  /* prefer native version */
129     case DLL_PROCESS_ATTACH:
130         DisableThreadLibraryCalls( hinstDLL );
131         break;
132     }
133     return TRUE;
134 }
135