LS_STR * | LicenseSystem; |
LS_STR * | PublisherName; |
LS_STR * | ProductName; |
LS_STR * | Version; |
LS_ULONG | TotUnitsReserved; |
LS_STR * | LogComment; |
LS_CHALLENGE * | Challenge; |
LS_ULONG * | TotUnitsGranted; |
LS_HANDLE * | hLicenseHandle; |
LS_STATUS_CODE | Status; |
LicenseSystem | Pointer to a string which uniquely identifies the particular license system. This may be obtained through the LSEnumProviders() API. Normally, the constant LS_ANY is specified to indicate a match against all installed license systems (indicates that all license providers should be searched for a license match). |
PublisherName | The name of the publisher (manufacturer) of this product. This string may not be null and must be unique in the first 32 characters. It is recommended that a company name and trademark be used. |
ProductName | The name of the product requesting licensing resources. This string may not be null and must be unique (in the first 32 characters) within the PublisherName domain. |
Version | The version number of this product. This string must be unique (in the first 12 characters) within the ProductName domain, and cannot be NULL |
NOTE: The arguments PublisherName, ProductName, and Version may not be NULL, or may not be LS_ANY. | |
TotUnitsReserved | Specifies the number of units required to run the application. The software publisher may choose to specify this policy attribute within the application. The recommended value of LS_DEFAULT_UNITS allows the licensing system to determine the proper value using information provided by the license system or license itself. The license system verifies that the requested number of units exist and may reserve those units, but no units are actually consumed at this time. The number of units available is returned in TotUnitsGranted. |
LogComment | An optional string indicating a comment to be associated with the request and logged (if logging is enabled and supported) by the underlying licensing system. The underlying license system may choose to log the comment even if an error is returned (i.e., logged with the error), but this is not guaranteed. If a string is not specified, the value must be LS_NULL. |
Challenge | Pointer to a challenge structure. The challenge response will also be returned in this structure. Refer to Challenge Mechanism on page 24 for more information. |
TotUnitsGranted | A pointer to an LS_ULONG in which the total number of units granted is returned. The following table describes the TotUnitsGranted return value, given the TotUnitsReserved input value, and the Status returned: |
TotUnitsReserved | LS_SUCCESS | LS_INSUFFICIENT_UNITS | Other errors |
LS_DEFAULT_UNITS | (A) | (B) | (E) |
Other (specific count) | (C) | (D) | (E) |
(A) The default umber of units commensurate with the license granted. (B) The maximum number of units available to the requesting software. This may be less than the normal default. (C) The number of units used to grant the request. Note that this value may be greater than or equal to the actual units requested (i.e., the policy may allow only in increments of 5 units, thus a request of 7 units would result in 10 units being granted). (D) The maximum number of units available to the requesting software. This may be more or less than the units requested. (E) Zero is returned. | |
LicenseHandle | Pointer to a LS_HANDLE in which a handle to the license context is to be returned. |
Status | Detailed error code that can be directly processed by the caller, or that can be converted into a localized message string by the LSGetMessage() function. |
LS_HANDLE | LicenseHandle; |
LS_ULONG | TotUnitsConsumed; |
LS_STR * | LogComment; |
LS_STATUS_CODE | Status; |
LicenseHandle | Handle identifying the license context. This argument must be a handle that was created with LSRequest(). |
TotUnitsConsumed | The TOTAL number of units consumed in this handle context since the initial LSRequest() call. The software publisher may choose to specify this policy attribute within the application. A value of LS_DEFAULT_UNITS indicates that the licensing system should determine the appropriate value using its own licensing policy mechanisms. |
LogComment | An optional string indicating a comment to be associated with the request and logged (if logging is enabled and supported) by the underlying licensing system. The underlying license system may choose to log the comment even if an error is returned (i.e., logged with the error), but this is not guaranteed. If a string is not specified, the value must be LS_NULL. |
Status | Detailed error code that can be directly processed by the caller, or that can be converted into a localized message string by the LSGetMessage() function. |
LS_HANDLE | LicenseHandle; |
LicenseHandle | Handle identifying the license context. This argument must be a handle that was created with LSRequest(). |
LS_HANDLE | LicenseHandle; |
LS_ULONG | TotUnitsConsumed; |
LS_ULONG | TotUnitsReserved; |
LS_STR * | LogComment; |
LS_CHALLENGE * | Challenge; |
LS_ULONG * | TotUnitsGranted; |
LS_STATUS_CODE | Status; |
LicenseHandle | Handle identifying the license context. This argument must be a handle that was created with LSRequest(). |
TotUnitsConsumed | The TOTAL number of units consumed so far in this handle context. The software publisher may choose to specify this policy attribute within the application. A value of LS_DEFAULT_UNITS indicates that the licensing system should determine the appropriate value using its own licensing policy mechanisms. If an error is returned, then no units are consumed. |
TotUnitsReserved | Specifies the total number of units to be reserved. If no additional units are required since the initial LSRequest() or last LSUpdate(), then this parameter should be the current total (as returned in TotUnitsGranted). The total reserved is inclusive of units consumed. That is, if an application requests 100 units be reserved, then consumes 20 units, there are still 100 units reserved (but only 80 available for consumption). |
LogComment | An optional string indicating a comment to be associated with the request and logged (if logging is enabled and supported) by the underlying licensing system. The underlying license system may choose to log the comment even if an error is returned (i.e., logged with the error), but this is not guaranteed. If a string is not specified, the value must be LS_NULL. |
Challenge | Pointer to a challenge structure. The challenge response will also be returned in this structure. Refer to Challenge Mechanism on page 24 for more information. |
TotUnitsGranted | A pointer to an LS_ULONG in which the total number of units granted since the initial license request is returned. The following table describes the TotUnitsGranted return value, given the TotUnitsReserved input value, and the Status returned: |
TotUnitsReserved | LS_SUCCESS | LS_INSUFFICIENT_UNITS | Other errors |
LS_DEFAULT_UNITS | (A) | (B) | (E) |
Other (specific count) | (C) | (D) | (E) |
(A) The default umber of units commensurate with the license granted. (B) The maximum number of units available to the requesting software. This may be less than the normal default. (C) The number of units used to grant the request. Note that this value may differ from the actual units requested (i.e., the policy may allow only in increments of 5 units, thus a request of 7 units would result in 10 units being granted). (D) The maximum number of units available to the requesting software. This may be more or less than the units requested. (E) Zero is returned. | |
Status | Detailed error code that can be directly processed by the caller, or that can be converted into a localized message string by the LSGetMessage() function. |
LS_HANDLE | LicenseHandle; |
LS_STATUS_CODE | Value; |
LS_STR * | Buffer; |
LS_ULONG | BufferSize; |
LS_STATUS_CODE | Status; |
LicenseHandle | Handle identifying the license context. This argument must be a handle that was created with LSRequest(). |
Value | Any status code returned by a License Service API function. |
Buffer | Pointer to a buffer in which a localized error message string is to be placed. |
BufferSize | Maximum size of the string that may be returned in Buffer. |
Status | Resulting status of LSGetMessage() call. |
LS_HANDLE | LicenseHandle; |
LS_ULONG | Information; |
LS_VOID * | InfoBuffer; |
LS_ULONG | BufferSize; |
LS_ULONG * | ActualBufferSize; |
LS_STATUS_CODE | Status; |
LicenseHandle | Handle identifying the license context. This argument must be a handle that was created with LSRequest(). |
Information | Index which identifies the information to be returned. |
InfoBuffer | Points to a buffer in which the resulting information is to be placed. |
BufferSize | Maximum size of the buffer pointed to by InfoBuffer. |
ActualBufferSize | On entry, points to a LS_ULONG whose value on exit indicates the actual count of characters returned in the buffer (not including the trailing NULL byte). |
Status | Detailed error code that can be directly processed by the caller, or which can be converted into a localized message string by the LSGetMessage function. |
Information Constant | Value | Meaning |
LS_INFO_NONE | 0 | Reserved. |
LS_INFO_SYSTEM | 1 | Return the unique identification of the license system supplying the current license context. This is returned as a null-terminated string. This value is the same as an appropriate call to LSEnumProviders() provides. |
LS_INFO_DATA | 2 | Return the block of miscellaneous application data contained on the license. This data is completely vendor-defined. The amount of space allocated for such data will vary from license system to license system, or may not be available at all. The first ULONG in the data buffer indicates the size (in bytes) of the actual data which follows: +--------------------------------+ | ULONG | | (count of bytes that follow) | +--------------------------------+ | Vendor data bytes from license | | | +--------------------------------+ |
LS_UPDATE_PERIOD | 3 | Return the recommended interval (in minutes) at which LSUpdate() should be called. +--------------------------------+ | ULONG | | Recommended Interval | | (in minutes) | +--------------------------------+ If a value of 0xFFFFFFFF is returned for the recommended interval, then no recommendation is being made. |
LS_LICENSE_CONTEXT | 4 | Return a value which uniquely identifies the licensing context within the specific license service provider identified by the LicenseHandle. +--------------------------------+ | ULONG | | Count of Bytes that follow | +--------------------------------+ | BYTES | ... | | +--------------------------------+ The contents of the bytes returned is license system specific. In circumstances where license system specific functionality is being used, this sequence of bytes may be used to identify the current license context. |
LS_ULONG | Index |
LS_STR * | Buffer |
LS_STATUS_CODE | Status; |
Index | Index of the service provider. The first provider has an index of zero, the second has an index of one, etc. This index should be incremented by the caller for each successive call to LSEnumProviders() until the status LS_BAD_INDEX is returned. |
Buffer | Points to a buffer in which the unique null-terminated string identifying the license system service provider is to be placed. The buffer pointed to by Buffer must be at least 255 bytes long. The value of LS_ANY indicates that the current index is not in use, but is not the last index to obtain. |
Status | Detailed error code that can be directly processed by the caller, or which can be converted into a localized message string by the LSGetMessage() function. |