Exemple #1
0
 // Token: 0x060001BC RID: 444 RVA: 0x00008370 File Offset: 0x00006570
 private static IEnumerable <string> EnumerateObjects(AmClusterNetworkHandle handle, AmClusterNetworkEnum objectType)
 {
     new List <string>(16);
     using (AmClusNetworkEnumHandle enumHandle = ClusapiMethods.ClusterNetworkOpenEnum(handle, objectType))
     {
         if (enumHandle.IsInvalid)
         {
             int lastWin32Error = Marshal.GetLastWin32Error();
             throw AmExceptionHelper.ConstructClusterApiException(lastWin32Error, "ClusterOpenNetworkEnum(objecttype={0})", new object[]
             {
                 objectType
             });
         }
         int           entryIndex       = 0;
         int           objectNameLen    = 256;
         StringBuilder objectNameBuffer = new StringBuilder(objectNameLen);
         int           errorCode;
         for (;;)
         {
             objectNameLen = objectNameBuffer.Capacity;
             AmClusterNetworkEnum objectTypeRetrived;
             errorCode = ClusapiMethods.ClusterNetworkEnum(enumHandle, entryIndex, out objectTypeRetrived, objectNameBuffer, ref objectNameLen);
             if (errorCode == 259)
             {
                 goto IL_171;
             }
             if (errorCode == 234)
             {
                 objectNameBuffer.EnsureCapacity(objectNameLen);
             }
             else
             {
                 if (errorCode != 0)
                 {
                     break;
                 }
                 if (objectTypeRetrived == objectType)
                 {
                     yield return(objectNameBuffer.ToString());
                 }
                 entryIndex++;
             }
         }
         throw AmExceptionHelper.ConstructClusterApiException(errorCode, "ClusterNetworkEnum()", new object[0]);
         IL_171 :;
     }
     yield break;
 }
Exemple #2
0
 internal static extern AmClusNetworkEnumHandle ClusterNetworkOpenEnum([In] AmClusterNetworkHandle hCluster, [In] AmClusterNetworkEnum dwType);
Exemple #3
0
 internal static extern int ClusterNetworkControl([In] AmClusterNetworkHandle hCluster, [In] IntPtr hHostNode, [In] AmClusterNetworkControlCode controlCode, [In] IntPtr inBuffer, [In] uint inBufferSize, [Out] IntPtr outBuffer, [In] uint outBufferSize, out uint bytesReturned);
Exemple #4
0
 internal static extern AmNetworkState GetClusterNetworkState([In] AmClusterNetworkHandle hNetwork);
Exemple #5
0
 public static extern AmClusterRegkeyHandle GetClusterNetworkKey(AmClusterNetworkHandle clusterNetworkHandle, RegSAM samDesired);
Exemple #6
0
 // Token: 0x0600019C RID: 412 RVA: 0x000075FE File Offset: 0x000057FE
 internal AmClusterNetwork(string networkName, IAmCluster owningCluster, AmClusterNetworkHandle networkHandle)
 {
     this.Name          = networkName;
     this.OwningCluster = owningCluster;
     this.Handle        = networkHandle;
 }