Now I'm working on a project automatically check out whether the file is digital signed, using the wintrust.dll. Below is the colde
[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
);
开发者_C百科
But there is error message about the class WinVerityTrustResult and WinTrustData class that they cannot be found. I tried to add the reference wintrust.dll and had registered it, but it prompt that I can't add the wintrust.dll.
You appear to have copied the function declaration from pinvoke.net. You also need to include the user defined types declared further down that page.
精彩评论