Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.4 KiB

  1. #ifndef _CARDDEFS_H_
  2. #define _CARDDEFS_H_
  3. #include <windows.h>
  4. #define cchCARD_SERIAL_NUMBER 40
  5. #define cchCARD_MAX_FILENAME 40
  6. //
  7. // Type: PFN_CSP_REQUEST_PIN
  8. //
  9. // Purpose: This callback is used by the Card Specific functions
  10. // to trigger the CSP to display UI to request that the user enter
  11. // a Pin.
  12. //
  13. // The pvCspRequestData pointer is CSP context information, opaque to
  14. // the Card Specific functions. It should be passed directly from
  15. // the CARD_DATA struct into this function.
  16. //
  17. typedef DWORD (*PFN_CSP_REQUEST_PIN)(IN PVOID pvCspRequestData, OUT LPSTR pszPin, OUT PDWORD pcbPin);
  18. //
  19. // Type: CARD_DATA
  20. //
  21. // Purpose: This struct contains card-specifc context information
  22. // and is passed to each of the Card Specific functions.
  23. //
  24. #define CARD_DATA_CURRENT_VER 1
  25. typedef struct _CARD_DATA
  26. {
  27. DWORD dwVersion;
  28. PVOID pvVendorSpecific;
  29. PINCACHE_HANDLE hPinCache;
  30. SCARDHANDLE hScard;
  31. //PVOID pvCspRequestData;
  32. //PFN_CSP_REQUEST_PIN pfnCspRequestPin;
  33. } CARD_DATA, *PCARD_DATA;
  34. //
  35. // Type: CONTAINER_INFO
  36. //
  37. // Purpose: This is the struct initialized in a call
  38. // to CardGetContainerInfo.
  39. //
  40. #define CONTAINER_INFO_CURRENT_VER 1
  41. typedef struct _CONTAINER_INFO
  42. {
  43. DWORD dwVersion;
  44. DWORD dwKeySpec;
  45. DWORD dwKeySize;
  46. // In the current architecture, this member is only interesting
  47. // in cache memory, not on the card, since we won't create
  48. // containers without cards.
  49. BOOL fHasAKey;
  50. } CONTAINER_INFO, *PCONTAINER_INFO;
  51. //
  52. // Type: CARD_CAPABILITIES
  53. //
  54. // Purpose: This is the struct initialized in a call
  55. // to CardQueryCapabilities.
  56. //
  57. #define CARD_CAPABILITIES_CURRENT_VER 1
  58. typedef struct _CARD_CAPABILITIES
  59. {
  60. DWORD dwVersion;
  61. BOOL fCompression;
  62. BOOL fFileChecksum;
  63. } CARD_CAPABILITIES, *PCARD_CAPABILITIES;
  64. //
  65. // Type: CARD_FREE_SPACE
  66. //
  67. // Purpose: This is the struct initialized in a call
  68. // to CardQueryFreeSpace.
  69. //
  70. #define CARD_FREE_SPACE_CURRENT_VER 1
  71. typedef struct _CARD_FREE_SPACE
  72. {
  73. DWORD dwVersion;
  74. DWORD cbAvailableBytes;
  75. DWORD cbAvailableContainers;
  76. } CARD_FREE_SPACE, *PCARD_FREE_SPACE;
  77. //
  78. // Type: CARD_KEY_SIZES
  79. //
  80. // Purpose: This is the struct initialized in a call
  81. // to CardQueryKeySizes.
  82. //
  83. #define CARD_KEY_SIZES_CURRENT_VER 1
  84. typedef struct _CARD_KEY_SIZES
  85. {
  86. DWORD dwVersion;
  87. DWORD dwMin;
  88. DWORD dwMax;
  89. DWORD dwDef;
  90. DWORD dwKeySizeInc;
  91. } CARD_KEY_SIZES, *PCARD_KEY_SIZES;
  92. #endif