It is very convenient to use a digital signature in VC 2005, as long as it contains wintrust. h. softpub. H and mscat. h, and add wintrust. LIB; you can call the API directly, but it is troublesome to use vc6. You need to refer to the function and struct Declaration on msdn and define the function pointer for the final call.
Because the project uses vc6, there is no way, so I had to pin the pointer to the function, and found that there are still problems:
1. The digital signature must be supported by the new SDK. If a new SDK is not installed, the function pointer cannot be correctly compiled.
2. the file where the function pointer is located cannot be precompiled with a header. Otherwise, it may conflict with some definitions of MFC. You need to select this file in the Project Settings and set its "precompiled headers ", set it to "not using procompiled headers". Of course, do not forget to add extern "c" to the function definition. You can use define to pack it.
For use in VC 2005, refer:
Http://www.titilima.cn/readblog.php? Id = 108