aboutsummaryrefslogtreecommitdiff
path: root/src/dtf/WixToolset.Dtf.Compression/SafeNativeMethods.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/dtf/WixToolset.Dtf.Compression/SafeNativeMethods.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/dtf/WixToolset.Dtf.Compression/SafeNativeMethods.cs b/src/dtf/WixToolset.Dtf.Compression/SafeNativeMethods.cs
new file mode 100644
index 00000000..1829ba81
--- /dev/null
+++ b/src/dtf/WixToolset.Dtf.Compression/SafeNativeMethods.cs
@@ -0,0 +1,22 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Dtf.Compression
4{
5 using System;
6 using System.Security;
7 using System.Runtime.InteropServices;
8
9 [SuppressUnmanagedCodeSecurity]
10 internal static class SafeNativeMethods
11 {
12 [DllImport("kernel32.dll", SetLastError = true)]
13 [return: MarshalAs(UnmanagedType.Bool)]
14 internal static extern bool DosDateTimeToFileTime(
15 short wFatDate, short wFatTime, out long fileTime);
16
17 [DllImport("kernel32.dll", SetLastError = true)]
18 [return: MarshalAs(UnmanagedType.Bool)]
19 internal static extern bool FileTimeToDosDateTime(
20 ref long fileTime, out short wFatDate, out short wFatTime);
21 }
22}