Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SLConsumeRight function

Let an application to exercise rights on a locally-stored licenses. Calling this function binds a license to the right.

Syntax


HRESULT WINAPI SLConsumeRight(
  _In_        HSLC hSLC,
  _In_        const SLID *pAppId,
  _In_opt_    const SLID *pProductSkuId,
  _In_opt_    PCWSTR pwszRightName,
  _Reserved_  PVOID pvReserved
);

Parameters

hSLC [in]

Type: HSLC

The handle to the current SLC context.

pAppId [in]

Type: const SLID*

A pointer to the identifier of the application who's right is going to be consumed.

pProductSkuId [in, optional]

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.

pwszRightName [in, optional]

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/valueDescription
E_INVALIDARG
0x80070057

One or more arguments are not valid.

SL_E_RIGHT_NOT_GRANTED
0xC004F013

The caller does not have permission to run the software.

SL_E_PRODUCT_SKU_NOT_INSTALLED
0xC004F015

The license is not installed.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Slpublic.h

Library

Slc.lib

DLL

Slc.dll

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.