SLIsGenuineLocalEx function (slpublic.h)

Checks whether the specified application installation is genuine.

Syntax

HRESULT SLIsGenuineLocalEx(
  [in]           const SLID       *pAppId,
  [in, optional] const SLID       *pSkuId,
  [out]          SL_GENUINE_STATE *pGenuineState
);

Parameters

[in] pAppId

A pointer to an SLID structure that specifies the application to check.

[in, optional] pSkuId

A pointer to an SLID structure that specifies the SKU of the application to check.

If this parameter is not NULL, this function uses the value of this parameter instead of the value of the pAppId parameter to check whether the application installation is genuine. If the SKU license contains a ProductUniquenessGroupId value, that value is also used to check whether the application is genuine.

[out] pGenuineState

A pointer to a value of the SL_GENUINE_STATE enumeration that specifies the state of the installation. This function does not change the value of this parameter if the return value is any value other than S_OK.

If this parameter is NULL, the function fails with a return value of E_INVALIDARG.

Return value

If the method succeeds, it returns S_OK.

If the method fails, it returns an error code. For a list of common error codes, see Common HRESULT Values.

Remarks

This function checks the Tampered flag of the license associated with the specified application and the SKU, if specified. If the license is not valid, or if the Tampered flag of either license is set, the installation is not considered genuine.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header slpublic.h
Library Slwga.lib
DLL Slwga.dll