diff options
Diffstat (limited to 'src/WixToolset.Core.Burn/VerifyInterop.cs')
-rw-r--r-- | src/WixToolset.Core.Burn/VerifyInterop.cs | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/WixToolset.Core.Burn/VerifyInterop.cs b/src/WixToolset.Core.Burn/VerifyInterop.cs deleted file mode 100644 index f021f1d0..00000000 --- a/src/WixToolset.Core.Burn/VerifyInterop.cs +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
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 | |||
3 | namespace WixToolset | ||
4 | { | ||
5 | using System; | ||
6 | using System.Runtime.InteropServices; | ||
7 | |||
8 | internal class VerifyInterop | ||
9 | { | ||
10 | internal const string GenericVerify2 = "00AAC56B-CD44-11d0-8CC2-00C04FC295EE"; | ||
11 | internal const uint WTD_UI_NONE = 2; | ||
12 | internal const uint WTD_REVOKE_NONE = 0; | ||
13 | internal const uint WTD_CHOICE_CATALOG = 2; | ||
14 | internal const uint WTD_STATEACTION_VERIFY = 1; | ||
15 | internal const uint WTD_REVOCATION_CHECK_NONE = 0x10; | ||
16 | internal const int ErrorInsufficientBuffer = 122; | ||
17 | |||
18 | [StructLayout(LayoutKind.Sequential)] | ||
19 | internal struct WinTrustData | ||
20 | { | ||
21 | internal uint cbStruct; | ||
22 | internal IntPtr pPolicyCallbackData; | ||
23 | internal IntPtr pSIPClientData; | ||
24 | internal uint dwUIChoice; | ||
25 | internal uint fdwRevocationChecks; | ||
26 | internal uint dwUnionChoice; | ||
27 | internal IntPtr pCatalog; | ||
28 | internal uint dwStateAction; | ||
29 | internal IntPtr hWVTStateData; | ||
30 | [MarshalAs(UnmanagedType.LPWStr)] | ||
31 | internal string pwszURLReference; | ||
32 | internal uint dwProvFlags; | ||
33 | internal uint dwUIContext; | ||
34 | } | ||
35 | |||
36 | [StructLayout(LayoutKind.Sequential)] | ||
37 | internal struct WinTrustCatalogInfo | ||
38 | { | ||
39 | internal uint cbStruct; | ||
40 | internal uint dwCatalogVersion; | ||
41 | [MarshalAs(UnmanagedType.LPWStr)] | ||
42 | internal string pcwszCatalogFilePath; | ||
43 | [MarshalAs(UnmanagedType.LPWStr)] | ||
44 | internal string pcwszMemberTag; | ||
45 | [MarshalAs(UnmanagedType.LPWStr)] | ||
46 | internal string pcwszMemberFilePath; | ||
47 | internal IntPtr hMemberFile; | ||
48 | internal IntPtr pbCalculatedFileHash; | ||
49 | internal uint cbCalculatedFileHash; | ||
50 | internal IntPtr pcCatalogContext; | ||
51 | } | ||
52 | |||
53 | [DllImport("wintrust.dll", SetLastError = true)] | ||
54 | internal static extern long WinVerifyTrust(IntPtr windowHandle, ref Guid actionGuid, ref WinTrustData trustData); | ||
55 | |||
56 | [DllImport("wintrust.dll", SetLastError = true)] | ||
57 | [return: MarshalAs(UnmanagedType.Bool)] | ||
58 | internal static extern bool CryptCATAdminCalcHashFromFileHandle( | ||
59 | IntPtr fileHandle, | ||
60 | [In, Out] | ||
61 | ref uint hashSize, | ||
62 | [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] | ||
63 | byte[] hashBytes, | ||
64 | uint flags); | ||
65 | } | ||
66 | } | ||