The diagram below shows the directory structure for PKIFv2 distribution:
The include directory contains the header files necessary to utilize the PKIF. The bin directory contains the dynamic link libraries. The lib directory contains the import libraries.
PKIFv2 is intended for use with Microsoft Visual C++ .NET 2005. All references to IDE dialogs, property pages, fields, etc. assume use of Microsoft Visual C++ .NET 2005.
After installing PKIFv2 as described above, perform the following steps to prepare a project to use PKIFv2:
1) Open the solution file for the project you wish to PK-enable using PKIFv2 then open the properties dialog for the target project.
2) From the properties dialog, expand the C/C++ folder.
3) Select General. Enter the path of the include directory for PKIFv2 (i.e. PKIF\inc) in the Additional Include Directories field. Optionally, set the Detect 64-bit Portability Issues option to "No".
4) Select Code Generation. Set the Runtime Library setting to Multi-threaded DLL (/MD) for release builds or Multi-threaded Debug DLL (/MDd) for debug builds.
5) Select Language. Set the Enable Run-time Type Info option to "Yes".
6) Expand the Linker folder.
7) Select General. Enter the path to lib directory for PKIFv2 (i.e. PKIF\lib) in the Additional Library Directories field.
8) Select Input. In the Additional Dependencies field enter "pkif.lib" for release builds and "pkifd.lib" for debug builds.
After performing the above steps, the project should be ready to use PKIFv2.
PKIFv2 header files are stored in three folders. General PKIFv2 headers are located in PKIF folder. Header files associated with Cryptographic Message Syntax (CMS) are located in PKIFCMS folders. Header files associated with Time Stamping Protocol are located in PKIFTSP folder. To include all general PKIFv2 headres use the following include statement:
#include "pkif.h"
To include all Cryptographic Message Syntax (CMS) related headres use the following include statement:
#include "PKIFCMS.h"
To inlcude all Time Stamping Protocol related headres use the following include statement:
#include "PKIFTSP.h"