csp11-0.4.0

所属分类:Windows编程
开发工具:C/C++
文件大小:621KB
下载次数:180
上传日期:2007-09-12 13:38:16
上 传 者昵称设置晚了
说明:  非常不错的CSP源码学习,想了解CSP的绝对要看
(Very good source to learn CSP, CSP would like to know the absolute depends)

文件列表:
csp-eleven\bin (0, 2004-12-14)
csp-eleven\bin\cert-installer.exe (39419, 2004-12-14)
csp-eleven\bin\csp11.dll (81945, 2004-12-14)
csp-eleven\bin\csp11ins.exe (20826, 2004-12-14)
csp-eleven\bin\cspTests.exe (44211, 2004-12-14)
csp-eleven\bin\myCerts.exe (20045, 2004-12-14)
csp-eleven\ChangeLog (4253, 2004-12-14)
csp-eleven\COPYING (18009, 2004-09-14)
csp-eleven\doc\doxygen.config (8207, 2004-11-05)
csp-eleven\doc\html (0, 2004-12-14)
csp-eleven\doc\html\annotated.html (3691, 2004-12-14)
csp-eleven\doc\html\bug.html (2850, 2004-12-14)
csp-eleven\doc\html\cert-installer_8c-source.html (50683, 2004-12-14)
csp-eleven\doc\html\cert-installer_8c.html (46399, 2004-12-14)
csp-eleven\doc\html\classes.html (3835, 2004-12-14)
csp-eleven\doc\html\crypto-helpers_8c-source.html (5334, 2004-12-14)
csp-eleven\doc\html\crypto-helpers_8c.html (7242, 2004-12-14)
csp-eleven\doc\html\crypto-helpers_8h-source.html (2047, 2004-12-14)
csp-eleven\doc\html\crypto-helpers_8h.html (6844, 2004-12-14)
csp-eleven\doc\html\csp-debug_8c-source.html (5001, 2004-12-14)
csp-eleven\doc\html\csp-debug_8c.html (7773, 2004-12-14)
csp-eleven\doc\html\csp-debug_8h-source.html (3192, 2004-12-14)
csp-eleven\doc\html\csp-debug_8h.html (13510, 2004-12-14)
csp-eleven\doc\html\csp11ins_8c-source.html (11918, 2004-12-14)
csp-eleven\doc\html\csp11ins_8c.html (20245, 2004-12-14)
csp-eleven\doc\html\csp11_8c-source.html (192221, 2004-12-14)
csp-eleven\doc\html\csp11_8c.html (40542, 2004-12-14)
csp-eleven\doc\html\csp11_8h-source.html (24092, 2004-12-14)
csp-eleven\doc\html\csp11_8h.html (48385, 2004-12-14)
csp-eleven\doc\html\cspTests_8c-source.html (53484, 2004-12-14)
csp-eleven\doc\html\cspTests_8c.html (44364, 2004-12-14)
csp-eleven\doc\html\dir_000000.html (4918, 2004-12-14)
csp-eleven\doc\html\dir_000001.html (1646, 2004-12-14)
csp-eleven\doc\html\dir_000002.html (1619, 2004-12-14)
csp-eleven\doc\html\dir_000003.html (1757, 2004-12-14)
csp-eleven\doc\html\dir_000004.html (1605, 2004-12-14)
csp-eleven\doc\html\doxygen.css (6517, 2004-12-14)
csp-eleven\doc\html\doxygen.png (1281, 2004-12-14)
csp-eleven\doc\html\files.html (4669, 2004-12-14)
csp-eleven\doc\html\functions.html (9383, 2004-12-14)
... ...

============================ How libcrypt32.a was created ============================ Introduction ============ Under Windows, no undefined symbol are permitted. According to this statement, every symbol call have to be defined in the Windows import library (.lib for MSVC or BCC, .a for GCC). When it was the time to compile the certificate installer, more than just type and constant missing definition, there was undefined symbols... The crypt32.dll import file from the MinGW/w32api distribution was out of date. We must create a new one. Definition file creation ======================== *Free, as freedom* We do not have MS VC, neither Borland C. We only use MinGW or Cygwin. So we cannot use the MinGW distributed *reimp.exe* file; we have to construct a good definition file by ourself. First of all, we grab the *impdef.cpp* file in order to produce a program that will extract symbol from the official Microsoft crypt32.dll file. :: impdef crypt32.dll > crypt32.def Definition file corrections =========================== Naming the DLL -------------- The produced definition file is too short, there is no DLL name information. Indeed, Windows have to know in wich DLL (designed by his file name) theses symbols have to be expected to be found. So, we just preprend this line to the file: :: LIBRARY CRYPT32.DLL Numbering the symbols --------------------- It is still confuse to us, but one thing is certain, windows calls are made by combination of a name and a ordinal (seems to be Pascal standard calls ordinal, if you know more, please send us an email). But how can we know the number ? Just reading the GCC error messages... So we appened some *@NN* to symbols names, as follow: :: CertAddCertificateContextToStore@16 CertCloseStore@8 CertCreateContext@24 CertSetCertificateContextProperty@16 If we encounter more undefined symbols, we will add them, without making the previous steps. Producing the import library ============================ To do it, we will use the *dlltool* utility. :: dlltool.exe --dllname CRYPT32.DLL --def crypt32.def -k -A --output-lib libcrypt32.a The *-k* option is **very important**, it remove the *@NN* from the exported symbol name. If this option is ommitted, the symbol will not be correctly exported. References ========== You can find some info, - `Conclusion of a mingw-users thread on the same subject`_ .. _Conclusion of a mingw-users thread on the same subject: http://sourceforge.net/mailarchive/forum.php?thread_id=935012&forum_id=5119

近期下载者

相关文件


收藏者