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.

101 lines
2.7 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. #ifndef __LRWIZAPI_H__
  3. #define __LRWIZAPI_H__
  4. #include "windows.h"
  5. #define LRWIZ_ERROR_BASE 6000
  6. //Return codes for LRWIZAPI
  7. #define LRWIZ_SUCCESS ERROR_SUCCESS
  8. #define LRWIZ_OPERATION_CANCELLED (LRWIZ_ERROR_BASE + 1)
  9. #define LRWIZ_OPERATION_EXIT (LRWIZ_ERROR_BASE + 2)
  10. #define LRWIZ_ERROR_INITIALIZE (LRWIZ_ERROR_BASE + 3)
  11. #define LRWIZ_ERROR_PREREG (LRWIZ_ERROR_BASE + 4)
  12. #define LRWIZ_ERROR_AUTHENTICATE (LRWIZ_ERROR_BASE + 5)
  13. #define LRWIZ_INVALID_REQUEST_TYPE (LRWIZ_ERROR_BASE + 6)
  14. #define LRWIZ_ERROR_ACCEPTING_PKCS7 (LRWIZ_ERROR_BASE + 7)
  15. #define LRWIZ_ERROR_DEPOSITING_CH_CERT (LRWIZ_ERROR_BASE + 8)
  16. #define LRWIZ_ERROR_PROCSSING_CH_DISK (LRWIZ_ERROR_BASE + 9)
  17. #define LRWIZ_ERROR_CREATING_PKCS10 (LRWIZ_ERROR_BASE + 10)
  18. #define ERROR_CONNECTING_TO_RA (LRWIZ_ERROR_BASE + 11)
  19. #define ERROR_INVALID_RA_RESPONSE (LRWIZ_ERROR_BASE + 12)
  20. #define LRWIZ_ERROR_NO_CERT (LRWIZ_ERROR_BASE + 13)
  21. #define ERROR_CONNECTING_TO_CH (LRWIZ_ERROR_BASE + 14)
  22. #define ERROR_INVALID_CH_RESPONSE (LRWIZ_ERROR_BASE + 15)
  23. #define LRWIZ_ERROR_UPGRADE_REQUIRED (LRWIZ_ERROR_BASE + 16)
  24. #define LRWIZ_ERROR_LS_NOT_RUNNING (LRWIZ_ERROR_BASE + 17)
  25. #define LRWIZ_ERROR_CREATE_FAILED (LRWIZ_ERROR_BASE + 18)
  26. #define LRWIZ_ERROR_NTVERSION_LT_5 (LRWIZ_ERROR_BASE + 19)
  27. #define LSERVERSTATUS_UNREGISTER 0 // server not register
  28. #define LSERVERSTATUS_WAITFORPIN 1 // server is waiting for PIN
  29. #define LSERVERSTATUS_REGISTER_INTERNET 2 // server is internet register
  30. #define LSERVERSTATUS_REGISTER_OTHER 3 // server is non-internet register
  31. typedef enum {
  32. WIZACTION_REGISTERLS,
  33. WIZACTION_DOWNLOADLKP,
  34. WIZACTION_UNREGISTERLS,
  35. WIZACTION_REREGISTERLS,
  36. WIZACTION_DOWNLOADLASTLKP,
  37. WIZACTION_SHOWPROPERTIES,
  38. WIZACTION_CONTINUEREGISTERLS
  39. } WIZACTION;
  40. typedef enum {
  41. CONNECTION_DEFAULT,
  42. CONNECTION_INTERNET,
  43. CONNECTION_WWW,
  44. CONNECTION_PHONE,
  45. CONNECTION_FAX // only used for backwards compatibility
  46. } WIZCONNECTION;
  47. #ifdef __cplusplus
  48. extern "C"
  49. {
  50. #endif
  51. //
  52. // Function return ERROR_SUCCESS or error code,
  53. // pConnectionType returns connection type set
  54. // by user
  55. //
  56. DWORD
  57. GetConnectionType(
  58. HWND hWndParent,
  59. LPCTSTR pszLSName,
  60. WIZCONNECTION* pConnectionType
  61. );
  62. //
  63. // Function return ERROR_SUCCESS or error code.
  64. // pdwServerStatus returns LSERVERSTATUS_XXXX
  65. //
  66. DWORD
  67. IsLicenseServerRegistered(
  68. HWND hWndParent,
  69. LPCTSTR pszLSName,
  70. PDWORD pdwServerStatus
  71. );
  72. //
  73. // Function return ERRROR_SUCCESS or error code.
  74. // pbRefresh returns TRUE if LicMgr need to refresh server,
  75. // FALSE otherwise.
  76. //
  77. DWORD
  78. StartWizard(
  79. HWND hWndParent,
  80. WIZACTION WizAction,
  81. LPCTSTR pszLSName,
  82. PBOOL pbRefresh
  83. );
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. #endif