cryptoki-w32.h 2.0 KB

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