slpublic.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_SLPUBLIC
  7. #define _INC_SLPUBLIC
  8. #if (_WIN32_WINNT >= 0x0600)
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. typedef GUID SLID;
  13. typedef enum _SL_GENUINE_STATE {
  14. SL_GEN_STATE_IS_GENUINE = 0,
  15. SL_GEN_STATE_INVALID_LICENSE = 1,
  16. SL_GEN_STATE_TAMPERED = 2,
  17. SL_GEN_STATE_LAST = 3
  18. } SL_GENUINE_STATE;
  19. typedef enum _tagSLDATATYPE {
  20. SL_DATA_NONE = REG_NONE,
  21. SL_DATA_SZ = REG_SZ,
  22. SL_DATA_DWORD = REG_DWORD,
  23. SL_DATA_BINARY = REG_BINARY,
  24. SL_DATA_MULTI_SZ = REG_MULTI_SZ,
  25. SL_DATA_SUM = 100
  26. } SLDATATYPE;
  27. typedef struct _tagSL_NONGENUINE_UI_OPTIONS {
  28. DWORD cbSize;
  29. const SLID *pComponentId;
  30. HRESULT hResultUI;
  31. } SL_NONGENUINE_UI_OPTIONS;
  32. HRESULT WINAPI SLAcquireGenuineTicket(
  33. void **ppTicketBlob,
  34. UINT *pcbTicketBlob,
  35. PCWSTR pwszTemplateId,
  36. PCWSTR pwszServerUrl,
  37. PCWSTR pwszClientToken
  38. );
  39. HRESULT WINAPI SLGetGenuineInformation(
  40. const SLID *pAppId,
  41. PCWSTR pwszValueName,
  42. SLDATATYPE *peDataType,
  43. UINT *pcbValue,
  44. BYTE **ppbValue
  45. );
  46. HRESULT WINAPI SLGetInstalledSAMLicenseApplications(
  47. UINT *pnReturnedAppIds,
  48. SLID **ppReturnedAppIds
  49. );
  50. HRESULT WINAPI SLGetSAMLicense(
  51. const SLID *pApplicationId,
  52. UINT *pcbXmlLicenseData,
  53. PBYTE *ppbXmlLicenseData
  54. );
  55. HRESULT WINAPI SLGetWindowsInformation(
  56. PCWSTR pwszValueName,
  57. SLDATATYPE *peDataType,
  58. UINT *pcbValue,
  59. PBYTE *ppbValue
  60. );
  61. HRESULT WINAPI SLGetWindowsInformationDWORD(
  62. PCWSTR pwszValueName,
  63. DWORD *pdwValue
  64. );
  65. HRESULT WINAPI SLInstallSAMLicense(
  66. const SLID *pApplicationId,
  67. UINT cbXmlLicenseData,
  68. const BYTE *pbXmlLicenseData
  69. );
  70. HRESULT WINAPI SLIsGenuineLocal(
  71. const SLID *pAppId,
  72. SL_GENUINE_STATE *pGenuineState,
  73. SL_NONGENUINE_UI_OPTIONS *pUIOptions
  74. );
  75. HRESULT WINAPI SLSetGenuineInformation(
  76. const SLID *pAppId,
  77. PCWSTR pwszValueName,
  78. SLDATATYPE eDataType,
  79. UINT cbValue,
  80. const BYTE *pbValue
  81. );
  82. HRESULT WINAPI SLUninstallSAMLicense(
  83. const SLID *pApplicationId
  84. );
  85. #if (_WIN32_WINNT >= 0x0601)
  86. HRESULT WINAPI SLIsGenuineLocalEx(
  87. const SLID *pAppId,
  88. const SLID pSkuId,
  89. SL_GENUINE_STATE *pGenuineState
  90. );
  91. #endif /*(_WIN32_WINNT >= 0x0601)*/
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95. #endif /*(_WIN32_WINNT >= 0x0600)*/
  96. #endif /*_INC_SLPUBLIC*/