/// <summary> /// Converts a standard FILETIME to an OpcRcw.Da.FILETIME structure. /// </summary> internal static OpcRcw.Hda.OPCHDA_FILETIME Convert(FILETIME input) { OpcRcw.Hda.OPCHDA_FILETIME output = new OpcRcw.Hda.OPCHDA_FILETIME(); output.dwLowDateTime = input.dwLowDateTime; output.dwHighDateTime = input.dwHighDateTime; return(output); }
/// <summary> /// Converts a decimal value to a OpcRcw.Hda.OPCHDA_TIME structure. /// </summary> internal static OpcRcw.Hda.OPCHDA_FILETIME GetFILETIME(decimal input) { OpcRcw.Hda.OPCHDA_FILETIME output = new OpcRcw.Hda.OPCHDA_FILETIME(); output.dwHighDateTime = (int)((((ulong)(input * 10000000)) & 0xFFFFFFFF00000000) >> 32); output.dwLowDateTime = (int)((((ulong)(input * 10000000)) & 0x00000000FFFFFFFF)); return(output); }
/// <summary> /// Returns an array of FILETIMEs. /// </summary> internal static OpcRcw.Hda.OPCHDA_FILETIME[] GetFILETIMEs(DateTime[] input) { OpcRcw.Hda.OPCHDA_FILETIME[] output = null; if (input != null) { output = new OpcRcw.Hda.OPCHDA_FILETIME[input.Length]; for (int ii = 0; ii < input.Length; ii++) { output[ii] = Convert(OpcCom.Interop.GetFILETIME(input[ii])); } } return(output); }