/// <summary> /// Set a DateTime value /// </summary> public PropVariant(DateTime value) { _valueType = (ushort)VarEnum.VT_FILETIME; System.Runtime.InteropServices.ComTypes.FILETIME ft = DateTimeToFileTime(value); PropVariantNativeMethods.InitPropVariantFromFileTime(ref ft, this); }
/// <summary> /// Set a DateTime value /// </summary> /// <param name="value">The new value to set.</param> public void SetDateTime(DateTime value) { valueType = (ushort)VarEnum.VT_FILETIME; PropVariant propVar; System.Runtime.InteropServices.ComTypes.FILETIME ft = DateTimeTotFileTime(value); PropVariantNativeMethods.InitPropVariantFromFileTime(ref ft, out propVar); CopyData(propVar); }