> ## 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

Comprueba si la licencia especificada es válida.

## Sintaxis

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

### Parámetros

*storeLicenseHandle*   \_In\_\
Tipo: XStoreLicenseHandle

Un identificador de la licencia.

### Valor devuelto

Tipo: bool

Devuelve true si la licencia es válida; de lo contrario, devuelve false.

## Comentarios

Es seguro llamar a esta API en subprocesos sensibles al tiempo.

Para ver un ejemplo de uso, consulte [XStoreAcquireLicenseForPackageAsync](/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync).
Use **XStoreIsLicenseValid** para comprobar si [XStoreAcquireLicenseForPackageResult](/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult) o [XStoreAcquireLicenseForDurablesResult](/reference/system/xstore/functions/xstoreacquirelicensefordurablesresult) devolvieron una licencia válida.
Si la licencia es válida, puede continuar con la configuración adicional, como el registro de funciones de devolución de llamada basadas en la actividad de la licencia.

<Note>Esta función solo comprueba el estado estático de la licencia tal como se obtuvo originalmente de las API XStoreAcquireLicense\*.
Si se registra con [XStoreRegisterPackageLicenseLost](/reference/system/xstore/functions/xstoreregisterpackagelicenselost) y la licencia deja de ser válida, debe volver a adquirir una nueva licencia para obtener el estado correcto antes de volver a llamar a esta API.</Note>

## Requisitos

**Encabezado:** XStore.h (incluido en XGameRuntime.h)

**Biblioteca:** xgameruntime.lib

**Plataformas compatibles:** Windows, consolas de la familia XBOX One y consolas XBOX Series

## Documentación conceptual

* [Concesión a los jugadores de acceso al contenido de complementos](/publishing/xstore-commerce/xstore-granting-access)

## Consulte también

[XStore](/reference/system/xstore/xstore_members)\
[XStoreAcquireLicenseForPackageAsync](/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync)\
[XStoreAcquireLicenseForPackageResult](/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult)\
[XStoreIsLicenseValid](/reference/system/xstore/functions/xstoreislicensevalid)\
[XStoreCloseLicenseHandle](/reference/system/xstore/functions/xstorecloselicensehandle)\
[XStoreRegisterPackageLicenseLost](/reference/system/xstore/functions/xstoreregisterpackagelicenselost)\
[XStoreUnregisterPackageLicenseLost](/reference/system/xstore/functions/xstoreunregisterpackagelicenselost)\
[Concesión a los jugadores de acceso al contenido de complementos](/publishing/xstore-commerce/xstore-granting-access)


## Related topics

- [XStoreCloseLicenseHandle](/es/reference/system/xstore/functions/xstorecloselicensehandle.md)
- [XStoreAcquireLicenseForPackageAsync](/es/reference/system/xstore/functions/xstoreacquirelicenseforpackageasync.md)
- [XStoreUnregisterPackageLicenseLost](/es/reference/system/xstore/functions/xstoreunregisterpackagelicenselost.md)
- [XStoreRegisterPackageLicenseLost](/es/reference/system/xstore/functions/xstoreregisterpackagelicenselost.md)
- [XStoreAcquireLicenseForPackageResult](/es/reference/system/xstore/functions/xstoreacquirelicenseforpackageresult.md)
