edab534f43eb081e6f36acbbb7dd5e292b7ebbfa
[reactos.git] / dll / win32 / clusapi / clusapi.c
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 #define WIN32_NO_STATUS
22
23 #include <stdarg.h>
24
25 #include <windef.h>
26 #include <winbase.h>
27 #include <clusapi.h>
28 #include <wine/debug.h>
29
30 WINE_DEFAULT_DEBUG_CHANNEL(clusapi);
31
32 /***********************************************************************
33 * GetClusterInformation (CLUSAPI.@)
34 *
35 */
36 DWORD WINAPI GetClusterInformation(HCLUSTER hCluster, LPWSTR lpszClusterName,
37 LPDWORD lpcchClusterName, LPCLUSTERVERSIONINFO lpClusterInfo)
38 {
39 FIXME("(%p, %p, %p, %p) stub!\n", hCluster, lpszClusterName, lpcchClusterName, lpClusterInfo);
40
41 *lpcchClusterName = 0;
42
43 return ERROR_SUCCESS;
44 }
45
46 /***********************************************************************
47 * GetNodeClusterState (CLUSAPI.@)
48 *
49 * PARAMS
50 * lpszNodeName [I] Optional Pointer to a NULL terminated unicode string
51 * pdwClusterState [O] Current state of the cluster
52 * 0x00 - Cluster not installed.
53 * 0x01 - Cluster not configured.
54 * 0x03 - Cluster not running.
55 * 0x13 - Cluster is running.
56 */
57 DWORD WINAPI GetNodeClusterState(LPCWSTR lpszNodeName, LPDWORD pdwClusterState)
58 {
59 FIXME("(%s,%p) stub!\n",debugstr_w(lpszNodeName),pdwClusterState);
60
61 *pdwClusterState = 0;
62
63 return ERROR_SUCCESS;
64 }
65
66 /***********************************************************************
67 * OpenCluster (CLUSAPI.@)
68 *
69 */
70 HCLUSTER WINAPI OpenCluster(LPCWSTR lpszClusterName)
71 {
72 FIXME("(%s) stub!\n", debugstr_w(lpszClusterName));
73
74 return (HCLUSTER)0xdeadbeef;
75 }
76
77 /***********************************************************************
78 * CloseCluster (CLUSAPI.@)
79 *
80 */
81 BOOL WINAPI CloseCluster(HCLUSTER hCluster)
82 {
83 FIXME("(%p) stub!\n", hCluster);
84
85 return TRUE;
86 }
87
88 /***********************************************************************
89 * ClusterOpenEnum (CLUSAPI.@)
90 *
91 */
92 HCLUSENUM WINAPI ClusterOpenEnum(HCLUSTER hCluster, DWORD dwType)
93 {
94 FIXME("(%p, %u) stub!\n", hCluster,dwType);
95
96 return (HCLUSENUM)0xdeadbeef;
97 }
98
99 /***********************************************************************
100 * ClusterCloseEnum (CLUSAPI.@)
101 *
102 */
103 DWORD WINAPI ClusterCloseEnum(HCLUSENUM hEnum)
104 {
105 FIXME("(%p) stub!\n", hEnum);
106
107 return ERROR_SUCCESS;
108 }
109
110 /***********************************************************************
111 * ClusterEnum (CLUSAPI.@)
112 *
113 */
114 DWORD WINAPI ClusterEnum(HCLUSENUM hEnum, DWORD dwIndex, LPDWORD lpdwType, LPWSTR lpszName, LPDWORD lpcchName)
115 {
116 FIXME("(%p, %u, %p, %p, %u) stub!\n", hEnum, dwIndex, lpdwType, lpszName, *lpcchName);
117
118 return ERROR_NO_MORE_ITEMS;
119 }
120
121 /***********************************************************************
122 * DllMain (CLUSAPI.@)
123 *
124 */
125 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
126 {
127 switch(fdwReason)
128 {
129 case DLL_WINE_PREATTACH:
130 return FALSE; /* prefer native version */
131 case DLL_PROCESS_ATTACH:
132 DisableThreadLibraryCalls( hinstDLL );
133 break;
134 }
135 return TRUE;
136 }