Export (0) Print
Expand All

SLSetCurrentProductKey function

Sets the current product key to the previously installed product key.

Syntax


HRESULT WINAPI SLSetCurrentProductKey(
  _In_  HSLC hSLC,
  _In_  const SLID *pProductSkuId,
  _In_  const SLID *pProductKeyId
);

Parameters

hSLC [in]

Type: HSLC

The handle to the current SLC context.

pProductSkuId [in]

Type: const SLID*

A pointer to the product SKU ID.

pProductKeyId [in]

Type: const SLID*

A pointer to the product key ID.

Return value

Type: HRESULT WINAPI

If this function succeeds, it return S_OK. Otherwise, it returns an HRESULT error code.

Return code/valueDescription
SL_E_MISMATCHED_PRODUCT_SKU
0xC004F069

The product SKU is not found.

SL_E_PKEY_NOT_INSTALLED
0xC004F014

The product key is not available.

SL_E_OPERATION_NOT_ALLOWED
0xC004F06A

The requested operation is not allowed.

 

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