Estonian ID Card C-library
cryptoki.h
1 /* cryptoki.h include file for PKCS #11. 2001 June 25 */
2 
3 
4 
5 /* This is a sample file containing the top level include directives
6 
7  * for building Win32 Cryptoki libraries and applications.
8 
9  */
10 
11 
12 
13 #ifndef ___CRYPTOKI_H_INC___
14 
15 #define ___CRYPTOKI_H_INC___
16 
17 
18 
19 #pragma pack(push, cryptoki, 1)
20 
21 
22 
23 /* Specifies that the function is a DLL entry point. */
24 
25 #define CK_IMPORT_SPEC __declspec(dllimport)
26 
27 
28 
29 /* Define CRYPTOKI_EXPORTS during the build of cryptoki libraries. Do
30 
31  * not define it in applications.
32 
33  */
34 
35 #ifdef CRYPTOKI_EXPORTS
36 
37 /* Specified that the function is an exported DLL entry point. */
38 
39 #define CK_EXPORT_SPEC __declspec(dllexport)
40 
41 #else
42 
43 #define CK_EXPORT_SPEC CK_IMPORT_SPEC
44 
45 #endif
46 
47 
48 
49 /* Ensures the calling convention for Win32 builds */
50 
51 #define CK_CALL_SPEC __cdecl
52 
53 
54 
55 #define CK_PTR *
56 
57 
58 
59 #define CK_DEFINE_FUNCTION(returnType, name) \
60  returnType CK_EXPORT_SPEC CK_CALL_SPEC name
61 
62 
63 
64 #define CK_DECLARE_FUNCTION(returnType, name) \
65  returnType CK_EXPORT_SPEC CK_CALL_SPEC name
66 
67 
68 
69 #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \
70  returnType CK_IMPORT_SPEC (CK_CALL_SPEC CK_PTR name)
71 
72 
73 
74 #define CK_CALLBACK_FUNCTION(returnType, name) \
75  returnType (CK_CALL_SPEC CK_PTR name)
76 
77 
78 
79 #ifndef NULL_PTR
80 
81 #define NULL_PTR 0
82 
83 #endif
84 
85 
86 
87 #include "pkcs11.h"
88 
89 
90 
91 #pragma pack(pop, cryptoki)
92 
93 
94 
95 #endif /* ___CRYPTOKI_H_INC___ */
96