2011-09-06 49 views
0

现在我正在开发一个项目,使用wintrust.dll自动检查文件是否是数字签名的。下面是colde无法添加wintrust.dll

[DllImport("wintrust.dll", ExactSpelling = true, SetLastError = false, CharSet = CharSet.Unicode)] 
static extern WinVerifyTrustResult WinVerifyTrust(
    [In] IntPtr hwnd, 
    [In] [MarshalAs(UnmanagedType.LPStruct)] Guid pgActionID, 
    [In] WinTrustData pWVTData 
); 

但有关于类WinVerityTrustResult和WinTrustData类,他们无法找到错误消息。我试图添加引用wintrust.dll并注册了它,但它提示我无法添加wintrust.dll。

回答

1

您似乎已从pinvoke.net复制函数声明。您还需要包含在该页面下方声明的用户定义类型。

+0

它的工作原理。谢谢 – liqian19891011