|
1 | | -// Copyright (c) 2024 Files Community |
2 | | -// Licensed under the MIT License. See the LICENSE. |
| 1 | +// Copyright (c) Files Community |
| 2 | +// Licensed under the MIT License. |
3 | 3 |
|
4 | 4 | using System.IO; |
5 | 5 | using System.Runtime.InteropServices; |
6 | | -using System.Runtime.InteropServices.ComTypes; |
7 | 6 | using System.Text; |
8 | 7 | using Windows.Win32.Foundation; |
9 | 8 | using Windows.Win32.System.Com; |
@@ -232,17 +231,17 @@ public static extern bool WriteFileEx( |
232 | 231 | [DllImport("api-ms-win-core-file-l1-2-1.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)] |
233 | 232 | public static extern bool GetFileTime( |
234 | 233 | [In] IntPtr hFile, |
235 | | - out FILETIME lpCreationTime, |
236 | | - out FILETIME lpLastAccessTime, |
237 | | - out FILETIME lpLastWriteTime |
| 234 | + out System.Runtime.InteropServices.ComTypes.FILETIME lpCreationTime, |
| 235 | + out System.Runtime.InteropServices.ComTypes.FILETIME lpLastAccessTime, |
| 236 | + out System.Runtime.InteropServices.ComTypes.FILETIME lpLastWriteTime |
238 | 237 | ); |
239 | 238 |
|
240 | 239 | [DllImport("api-ms-win-core-file-l1-2-1.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)] |
241 | 240 | public static extern bool SetFileTime( |
242 | 241 | [In] IntPtr hFile, |
243 | | - in FILETIME lpCreationTime, |
244 | | - in FILETIME lpLastAccessTime, |
245 | | - in FILETIME lpLastWriteTime |
| 242 | + in System.Runtime.InteropServices.ComTypes.FILETIME lpCreationTime, |
| 243 | + in System.Runtime.InteropServices.ComTypes.FILETIME lpLastAccessTime, |
| 244 | + in System.Runtime.InteropServices.ComTypes.FILETIME lpLastWriteTime |
246 | 245 | ); |
247 | 246 |
|
248 | 247 | [DllImport("api-ms-win-core-file-l2-1-1.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)] |
@@ -288,7 +287,7 @@ IntPtr hFindFile |
288 | 287 |
|
289 | 288 | [DllImport("api-ms-win-core-timezone-l1-1-0.dll", SetLastError = true)] |
290 | 289 | public static extern bool FileTimeToSystemTime( |
291 | | - ref FILETIME lpFileTime, |
| 290 | + ref System.Runtime.InteropServices.ComTypes.FILETIME lpFileTime, |
292 | 291 | out SYSTEMTIME lpSystemTime |
293 | 292 | ); |
294 | 293 |
|
@@ -347,5 +346,9 @@ public static extern int SHGetKnownFolderPath( |
347 | 346 | IntPtr hToken, |
348 | 347 | out IntPtr pszPath |
349 | 348 | ); |
| 349 | + |
| 350 | + // cryptui.dll |
| 351 | + [DllImport("cryptui.dll", SetLastError = true, CharSet = CharSet.Auto)] |
| 352 | + public unsafe static extern bool CryptUIDlgViewSignerInfo(CRYPTUI_VIEWSIGNERINFO_STRUCT* pViewInfo); |
350 | 353 | } |
351 | 354 | } |
0 commit comments