internal ReplicationFailureCollection ConstructFailures(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
 {
     ReplicationFailureCollection failures = new ReplicationFailureCollection(server);
     try
     {
         if (info != IntPtr.Zero)
         {
             DS_REPL_KCC_DSA_FAILURES structure = new DS_REPL_KCC_DSA_FAILURES();
             Marshal.PtrToStructure(info, structure);
             if (structure.cNumEntries > 0)
             {
                 failures.AddHelper(structure, info);
             }
         }
     }
     finally
     {
         this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, info, libHandle);
     }
     return failures;
 }
コード例 #2
0
        internal ReplicationFailureCollection ConstructFailures(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationFailureCollection failures = new ReplicationFailureCollection(server);

            try
            {
                if (info != IntPtr.Zero)
                {
                    DS_REPL_KCC_DSA_FAILURES structure = new DS_REPL_KCC_DSA_FAILURES();
                    Marshal.PtrToStructure(info, structure);
                    if (structure.cNumEntries > 0)
                    {
                        failures.AddHelper(structure, info);
                    }
                }
            }
            finally
            {
                this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, info, libHandle);
            }
            return(failures);
        }
コード例 #3
0
        internal ReplicationFailureCollection ConstructFailures(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationFailureCollection replicationFailureCollection = new ReplicationFailureCollection(server);

            try
            {
                if (info != (IntPtr)0)
                {
                    DS_REPL_KCC_DSA_FAILURES dSREPLKCCDSAFAILURE = new DS_REPL_KCC_DSA_FAILURES();
                    Marshal.PtrToStructure(info, dSREPLKCCDSAFAILURE);
                    int num = dSREPLKCCDSAFAILURE.cNumEntries;
                    if (num > 0)
                    {
                        replicationFailureCollection.AddHelper(dSREPLKCCDSAFAILURE, info);
                    }
                }
            }
            finally
            {
                this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, info, libHandle);
            }
            return(replicationFailureCollection);
        }
コード例 #4
0
        internal ReplicationFailureCollection ConstructFailures(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationFailureCollection collection = new ReplicationFailureCollection(server);
            int count = 0;

            try
            {
                if (info != (IntPtr)0)
                {
                    DS_REPL_KCC_DSA_FAILURES failures = new DS_REPL_KCC_DSA_FAILURES();
                    Marshal.PtrToStructure(info, failures);
                    count = failures.cNumEntries;
                    if (count > 0)
                    {
                        collection.AddHelper(failures, info);
                    }
                }
            }
            finally
            {
                FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, info, libHandle);
            }
            return(collection);
        }
コード例 #5
0
ファイル: DirectoryServer.cs プロジェクト: chcosta/corefx
        internal ReplicationFailureCollection ConstructFailures(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationFailureCollection collection = new ReplicationFailureCollection(server);
            int count = 0;

            try
            {
                if (info != (IntPtr)0)
                {
                    DS_REPL_KCC_DSA_FAILURES failures = new DS_REPL_KCC_DSA_FAILURES();
                    Marshal.PtrToStructure(info, failures);
                    count = failures.cNumEntries;
                    if (count > 0)
                        collection.AddHelper(failures, info);
                }
            }
            finally
            {
                FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, info, libHandle);
            }
            return collection;
        }
コード例 #6
0
ファイル: DirectoryServer.cs プロジェクト: nickchal/pash
		internal ReplicationFailureCollection ConstructFailures(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
		{
			ReplicationFailureCollection replicationFailureCollection = new ReplicationFailureCollection(server);
			try
			{
				if (info != (IntPtr)0)
				{
					DS_REPL_KCC_DSA_FAILURES dSREPLKCCDSAFAILURE = new DS_REPL_KCC_DSA_FAILURES();
					Marshal.PtrToStructure(info, dSREPLKCCDSAFAILURE);
					int num = dSREPLKCCDSAFAILURE.cNumEntries;
					if (num > 0)
					{
						replicationFailureCollection.AddHelper(dSREPLKCCDSAFAILURE, info);
					}
				}
			}
			finally
			{
				this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, info, libHandle);
			}
			return replicationFailureCollection;
		}