1 /* cryptoki.h include file for PKCS #11. */
\r
2 /* $Revision: 1.4 $ */
\r
4 /* License to copy and use this software is granted provided that it is
\r
5 * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
\r
6 * (Cryptoki)" in all material mentioning or referencing this software.
\r
8 * License is also granted to make and use derivative works provided that
\r
9 * such works are identified as "derived from the RSA Security Inc. PKCS #11
\r
10 * Cryptographic Token Interface (Cryptoki)" in all material mentioning or
\r
11 * referencing the derived work.
\r
13 * RSA Security Inc. makes no representations concerning either the
\r
14 * merchantability of this software or the suitability of this software for
\r
15 * any particular purpose. It is provided "as is" without express or implied
\r
16 * warranty of any kind.
\r
19 /* This is a sample file containing the top level include directives
\r
20 * for building Win32 Cryptoki libraries and applications.
\r
23 #ifndef ___CRYPTOKI_H_INC___
\r
24 #define ___CRYPTOKI_H_INC___
\r
26 #pragma pack(push, cryptoki, 1)
\r
28 /* Specifies that the function is a DLL entry point. */
\r
29 #define CK_IMPORT_SPEC __declspec(dllimport)
\r
31 /* Define CRYPTOKI_EXPORTS during the build of cryptoki libraries. Do
\r
32 * not define it in applications.
\r
34 #ifdef CRYPTOKI_EXPORTS
\r
35 /* Specified that the function is an exported DLL entry point. */
\r
36 #define CK_EXPORT_SPEC __declspec(dllexport)
\r
38 #define CK_EXPORT_SPEC CK_IMPORT_SPEC
\r
41 /* Ensures the calling convention for Win32 builds */
\r
42 #define CK_CALL_SPEC __cdecl
\r
46 #define CK_DEFINE_FUNCTION(returnType, name) \
\r
47 returnType CK_EXPORT_SPEC CK_CALL_SPEC name
\r
49 #define CK_DECLARE_FUNCTION(returnType, name) \
\r
50 returnType CK_EXPORT_SPEC CK_CALL_SPEC name
\r
52 #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \
\r
53 returnType CK_IMPORT_SPEC (CK_CALL_SPEC CK_PTR name)
\r
55 #define CK_CALLBACK_FUNCTION(returnType, name) \
\r
56 returnType (CK_CALL_SPEC CK_PTR name)
\r
64 #pragma pack(pop, cryptoki)
\r
66 #endif /* ___CRYPTOKI_H_INC___ */
\r