Leaked source code of windows server 2003
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.

107 lines
2.9 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. WIZTYPE_ACTIVATION,
  42. WIZTYPE_CAL
  43. } WIZTYPE;
  44. typedef enum {
  45. CONNECTION_DEFAULT,
  46. CONNECTION_INTERNET,
  47. CONNECTION_WWW,
  48. CONNECTION_PHONE,
  49. CONNECTION_FAX // only used for backwards compatibility
  50. } WIZCONNECTION;
  51. #ifdef __cplusplus
  52. extern "C"
  53. {
  54. #endif
  55. //
  56. // Function return ERROR_SUCCESS or error code,
  57. // pConnectionType returns connection type set
  58. // by user
  59. //
  60. DWORD
  61. GetConnectionType(
  62. HWND hWndParent,
  63. LPCTSTR pszLSName,
  64. WIZCONNECTION* pConnectionType
  65. );
  66. //
  67. // Function return ERROR_SUCCESS or error code.
  68. // pdwServerStatus returns LSERVERSTATUS_XXXX
  69. //
  70. DWORD
  71. IsLicenseServerRegistered(
  72. HWND hWndParent,
  73. LPCTSTR pszLSName,
  74. PDWORD pdwServerStatus
  75. );
  76. //
  77. // Function return ERRROR_SUCCESS or error code.
  78. // pbRefresh returns TRUE if LicMgr need to refresh server,
  79. // FALSE otherwise.
  80. //
  81. DWORD
  82. StartWizard(
  83. HWND hWndParent,
  84. WIZACTION WizAction,
  85. LPCTSTR pszLSName,
  86. PBOOL pbRefresh
  87. );
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91. #endif