public ClusterRegistryConfigurationProvider(SafeHResource hResource)
 {
     this.hKey = Microsoft.Transactions.Wsat.Clusters.SafeNativeMethods.GetClusterResourceKey(hResource, RegistryRights.ExecuteKey);
     if (this.hKey.IsInvalid)
     {
         int num = Marshal.GetLastWin32Error();
         this.hKey.SetHandleAsInvalid();
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationProviderException(Microsoft.Transactions.SR.GetString("GetClusterResourceKeyFailed", new object[] { num })));
     }
     if (DebugTrace.Verbose)
     {
         DebugTrace.Trace(TraceLevel.Verbose, "Opened cluster resource key");
     }
 }
 public ClusterRegistryConfigurationProvider(SafeHResource hResource)
 {
     this.hKey = Microsoft.Transactions.Wsat.Clusters.SafeNativeMethods.GetClusterResourceKey(hResource, RegistryRights.ExecuteKey);
     if (this.hKey.IsInvalid)
     {
         int num = Marshal.GetLastWin32Error();
         this.hKey.SetHandleAsInvalid();
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationProviderException(Microsoft.Transactions.SR.GetString("GetClusterResourceKeyFailed", new object[] { num })));
     }
     if (DebugTrace.Verbose)
     {
         DebugTrace.Trace(TraceLevel.Verbose, "Opened cluster resource key");
     }
 }
 private ClusterRegistryConfigurationProvider(SafeHKey rootKey, string subKey)
 {
     if ((rootKey != null) && !rootKey.IsInvalid)
     {
         int num = Microsoft.Transactions.Wsat.Clusters.SafeNativeMethods.ClusterRegOpenKey(rootKey, subKey, RegistryRights.ExecuteKey, out this.hKey);
         if (num != 0L)
         {
             Utility.CloseInvalidOutSafeHandle(this.hKey);
             if (num != 2L)
             {
                 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationProviderException(Microsoft.Transactions.SR.GetString("ClusterRegOpenKeyFailed", new object[] { num })));
             }
         }
         if (DebugTrace.Verbose)
         {
             DebugTrace.Trace(TraceLevel.Verbose, "ClusterRegOpenKey for {0} returned {1}", subKey, num);
         }
     }
 }
 private ClusterRegistryConfigurationProvider(SafeHKey rootKey, string subKey)
 {
     if ((rootKey != null) && !rootKey.IsInvalid)
     {
         int num = Microsoft.Transactions.Wsat.Clusters.SafeNativeMethods.ClusterRegOpenKey(rootKey, subKey, RegistryRights.ExecuteKey, out this.hKey);
         if (num != 0L)
         {
             Utility.CloseInvalidOutSafeHandle(this.hKey);
             if (num != 2L)
             {
                 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationProviderException(Microsoft.Transactions.SR.GetString("ClusterRegOpenKeyFailed", new object[] { num })));
             }
         }
         if (DebugTrace.Verbose)
         {
             DebugTrace.Trace(TraceLevel.Verbose, "ClusterRegOpenKey for {0} returned {1}", subKey, num);
         }
     }
 }
Ejemplo n.º 5
0
 public static extern int ClusterRegQueryValue([In] SafeHKey hKey, [In, MarshalAs(UnmanagedType.LPWStr)] string lpszValueName, out RegistryValueKind lpdwValueType, [In, Out, MarshalAs(UnmanagedType.LPArray)] byte[] lpbData, [In, Out] ref uint lpcbData);
Ejemplo n.º 6
0
 public static extern int ClusterRegOpenKey([In] SafeHKey hKey, [In, MarshalAs(UnmanagedType.LPWStr)] string lpszSubKey, [In] RegistryRights samDesired, out SafeHKey phkResult);
 public static extern int ClusterRegOpenKey([In] SafeHKey hKey, [In, MarshalAs(UnmanagedType.LPWStr)] string lpszSubKey, [In] RegistryRights samDesired, out SafeHKey phkResult);