The cluster registry is different from the single-host registry. The cluster registry can be seen on each node of the cluster. The data is synchronized, so the registry operation method on the cluster is not the same, for details, refer
Http://msdn.microsoft.com/en-us/library/aa369128 (V = vs.85). aspx
The following example shows how to operate the cluster registry, including creating, opening, setting, and querying values.
Hcluster CLS = opencluster (null); If (! CLs) {return false;} hkey = getclusterkey (CLS, key_all_access); If (! Hkey) {closecluster (CLS); Return false;} hkey hkresult; DWORD dwdisposition = 0; DWORD cddata = 50; DWORD dwvaluetype = REG_SZ; byte data [100] = {0 }; long ret = clusterregcreatekey (hkey, l "testsubkey", reg_option_non_volatile, key_all_access, null, & hkresult, & dwdisposition); ret = clusterregsetvalue (hkresult, l "testval", REG_SZ, (byte *) (L "12345"), 12); ret = clusterregqueryvalue (hkresult, l "testval", & dwvaluetype, Data, & cddata ); ret = clusterregclosekey (hkresult); ret = clusterregclosekey (hkey); ret = closecluster (CLS );
Zookeeper
Cluster registry operation method