private static DateTime WindowsTimeToDateTime(NetlogonWindowsAPI.TIME_OF_DAY_INFO_WINDOWS windowsDCTime)
        {

            DateTime DCDateTime = new DateTime(
                (int)windowsDCTime.tod_year,
                (int)windowsDCTime.tod_month - 1,
                (int)windowsDCTime.tod_day - 1,
                (int)windowsDCTime.tod_hours,
                (int)windowsDCTime.tod_mins,
                (int)windowsDCTime.tod_secs
                );

            return DCDateTime;

        }
        private static string DCINFOToString(NetlogonWindowsAPI.DOMAIN_CONTROLLER_INFO DCInfoWindows)
        {

            int i = 0;

            string[] domainGUIDStrings = new string[CNetlogon.Definitions.LWNET_GUID_SIZE];
            string domainGUIDString = null;
            byte[] guidArr = DCInfoWindows.DomainGuid.ToByteArray();

            for (i = 0; i < guidArr.Length; i++)
            {
                domainGUIDStrings[i] = String.Format("{0:x2} ", guidArr[i]);
            }

            domainGUIDString = String.Concat(domainGUIDStrings);

            StringBuilder sb = new StringBuilder();
            sb.Append("DomainControllerName:");
            sb.Append(DCInfoWindows.DomainControllerName);
            sb.Append(";");

            sb.Append("DomainControllerAddress:");
            sb.Append(DCInfoWindows.DomainControllerAddress);
            sb.Append(";");

            sb.Append("domainGUID: ");
            sb.Append(domainGUIDString);
            sb.Append(";");

            sb.Append("DomainName:");
            sb.Append(DCInfoWindows.DomainName);
            sb.Append(";");

            sb.Append("DnsForestName:");
            sb.Append(DCInfoWindows.DnsForestName);
            sb.Append(";");

            sb.Append("Flags:");
            sb.Append(DCInfoWindows.Flags);
            sb.Append(";");

            sb.Append("DCSiteName:");
            sb.Append(DCInfoWindows.DcSiteName);
            sb.Append(";");

            sb.Append("ClientSiteName:");
            sb.Append(DCInfoWindows.ClientSiteName);
            sb.Append(";");

            return sb.ToString();

        }