SLConsumeRight function (slpublic.h)
Let an application to exercise rights on a locally-stored licenses. Calling this function binds a license to the right.
Syntax
HRESULT SLConsumeRight(
[in] HSLC hSLC,
[in] const SLID *pAppId,
[in, optional] const SLID *pProductSkuId,
[in, optional] PCWSTR pwszRightName,
PVOID pvReserved
);
Parameters
[in] hSLC
Type: HSLC
The handle to the current SLC context.
[in] pAppId
Type: const SLID*
A pointer to the identifier of the application who's right is going to be
consumed.
[in, optional] pProductSkuId
Type: const SLID*
A pointer to the identifier of product SKU. If set to NULL, all of the product SKU's
licenses will be consumed.
[in, optional] pwszRightName
Type: PCWSTR
The name of right to be consumed.
pvReserved
Type: PVOID
Reserved.
Return value
Type: HRESULT WINAPI
If this function succeeds, it return S_OK. Otherwise, it returns an HRESULT error code.
Return code/value | Description |
---|---|
|
One or more arguments are not valid. |
|
The caller does not have permission to run the software. |
|
The license is not installed. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | slpublic.h |
Library | Slc.lib |
DLL | Slc.dll |