예제 #1
0
파일: Interop.cs 프로젝트: ZSYMAX/OpcNetApi
        internal static OPCHDA_FILETIME GetFILETIME(decimal input)
        {
            OPCHDA_FILETIME result = default(OPCHDA_FILETIME);

            result.dwHighDateTime = (int)((ulong)((long)(ulong)(input * 10000000m) & -4294967296L) >> 32);
            result.dwLowDateTime  = (int)((ulong)(input * 10000000m) & uint.MaxValue);
            return(result);
        }
예제 #2
0
파일: Interop.cs 프로젝트: ZSYMAX/OpcNetApi
        internal static FILETIME Convert(OPCHDA_FILETIME input)
        {
            FILETIME result = default(FILETIME);

            result.dwLowDateTime  = input.dwLowDateTime;
            result.dwHighDateTime = input.dwHighDateTime;
            return(result);
        }
예제 #3
0
파일: Interop.cs 프로젝트: ZSYMAX/OpcNetApi
 internal static OPCHDA_FILETIME[] GetFILETIMEs(DateTime[] input)
 {
     OPCHDA_FILETIME[] array = null;
     if (input != null)
     {
         array = new OPCHDA_FILETIME[input.Length];
         for (int i = 0; i < input.Length; i++)
         {
             ref OPCHDA_FILETIME reference = ref array[i];
             reference = Convert(OpcCom.Interop.GetFILETIME(input[i]));
         }
     }
예제 #4
0
 internal static OPCHDA_FILETIME[] GetFILETIMEs(DateTime[] input)
 {
     OPCHDA_FILETIME[] opchda_filetimeArray = null;
     if (input != null)
     {
         opchda_filetimeArray = new OPCHDA_FILETIME[input.Length];
         for (int i = 0; i < input.Length; i++)
         {
             opchda_filetimeArray[i] = Convert(OpcCom.Interop.GetFILETIME(input[i]));
         }
     }
     return(opchda_filetimeArray);
 }
예제 #5
0
 internal static FILETIME Convert(OPCHDA_FILETIME input)
 {
     return(new FILETIME {
         dwLowDateTime = input.dwLowDateTime, dwHighDateTime = input.dwHighDateTime
     });
 }