Export (0) Print
Expand All

SLInstallProofOfPurchaseEx function

Register the product key with SL.

Syntax


HRESULT WINAPI SLInstallProofOfPurchaseEx(
  _In_      HSLC hSLC,
  _In_      const SLID *pApplicationId,
  _In_opt_  const SLID *pProductSkuId,
  _In_      PCWSTR pwszPKeyAlgorithm,
  _In_      PCWSTR pwszPKeyString,
  _In_      UINT cbPKeySpecificData,
  _In_opt_  PBYTE pbPKeySpecificData,
  _Out_     SLID *pPKeyId
);

Parameters

hSLC [in]

Type: HSLC

The handle to the current SLC context.

pApplicationId [in]

Type: const SLID*

A pointer to the application ID.

pProductSkuId [in, optional]

Type: const SLID*

A pointer to the product SKU ID.

pwszPKeyAlgorithm [in]

Type: PCWSTR

The product key algorithm.

pwszPKeyString [in]

Type: PCWSTR

The product key string.

cbPKeySpecificData [in]

Type: UINT

The size, in bytes, of the product key specific data. If no PKey specific data exists, set cbPKeySpecificData to 0.

pbPKeySpecificData [in, optional]

Type: PBYTE

A pointer to product key specific data. If no PKey specific data exists, set pbPKeySpecificData to NULL.

pPKeyId [out]

Type: SLID*

A pointer to the identifier of the registered product key. Used to reference PKey information.

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.

E_ACCESSDENIED
0x80070005

Access denied (API requires admin privileges).

SL_E_LUA_ACCESSDENIED
0xC004F025

The action requires administrator privilege.

SL_E_INVALID_PKEY
0xC004F010

The product key is not valid.

SL_E_PRODUCT_SKU_NOT_INSTALLED
0xC004F015

The license is not installed.

SL_E_PKEY_INVALID_UPGRADE
0xC004F061

This specified product key can only be used for upgrading, not for clean installations.

SL_E_MISMATCHED_PRODUCT_SKU
0xC004F069

The product SKU is not found.

 

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft