> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XStoreIsLicenseValid

> XStoreIsLicenseValid

# XStoreIsLicenseValid

Verifica se a licença especificada é válida.

## Sintaxe

```cpp theme={null}
bool XStoreIsLicenseValid(  
         const XStoreLicenseHandle storeLicenseHandle  
)  
```

### Parâmetros

*storeLicenseHandle*   \_In\_\
Tipo: XStoreLicenseHandle

Um identificador para a licença.

### Valor retornado

Tipo: bool

Retorna true se a licença for válida; caso contrário, retorna false.

## Comentários

É seguro chamar esta API em threads sensíveis ao tempo.

Para obter um exemplo de uso, consulte [XStoreAcquireLicenseForPackageAsync](/pt-BR/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync).
Use **XStoreIsLicenseValid** para verificar se uma licença válida foi retornada por [XStoreAcquireLicenseForPackageResult](/pt-BR/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult) ou [XStoreAcquireLicenseForDurablesResult](/pt-BR/reference/system/xstore/functions/xstoreacquirelicensefordurablesresult).
Se a licença for válida, você poderá prosseguir com a configuração adicional, como registrar funções de retorno de chamada baseadas na atividade da licença.

<Note>Esta função verifica apenas o estado estático da licença no momento em que ela foi obtida originalmente das APIs XStoreAcquireLicense\*.
Se você se registrar com [XStoreRegisterPackageLicenseLost](/pt-BR/reference/system/xstore/functions/xstoreregisterpackagelicenselost) e a licença se tornar inválida, você deverá readquirir uma nova licença para obter o estado correto antes de chamar esta API novamente.</Note>

## Requisitos

**Cabeçalho:** XStore.h (incluído em XGameRuntime.h)

**Biblioteca:** xgameruntime.lib

**Plataformas com suporte:** Windows, consoles da família XBOX One e consoles XBOX Series

## Documentação conceitual

* [Concedendo aos jogadores acesso a conteúdo de complementos](/pt-BR/publishing/xstore-commerce/xstore-granting-access)

## Confira também

[XStore](/pt-BR/reference/system/xstore/xstore_members)\
[XStoreAcquireLicenseForPackageAsync](/pt-BR/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync)\
[XStoreAcquireLicenseForPackageResult](/pt-BR/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult)\
[XStoreIsLicenseValid](/pt-BR/reference/system/xstore/functions/xstoreislicensevalid)\
[XStoreCloseLicenseHandle](/pt-BR/reference/system/xstore/functions/xstorecloselicensehandle)\
[XStoreRegisterPackageLicenseLost](/pt-BR/reference/system/xstore/functions/xstoreregisterpackagelicenselost)\
[XStoreUnregisterPackageLicenseLost](/pt-BR/reference/system/xstore/functions/xstoreunregisterpackagelicenselost)\
[Concedendo aos jogadores acesso a conteúdo de complementos](/pt-BR/publishing/xstore-commerce/xstore-granting-access)


## Related topics

- [XStoreIsLicenseValid](/reference/system/xstore/functions/xstoreislicensevalid.md)
- [XStoreAcquireLicenseForPackageAsync](/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync.md)
- [XStoreAcquireLicenseForDurablesResult](/reference/system/xstore/functions/xstoreacquirelicensefordurablesresult.md)
- [XStoreCloseLicenseHandle](/reference/system/xstore/functions/xstorecloselicensehandle.md)
- [XStoreAcquireLicenseForPackageResult](/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)
