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

# XPackageChunkAvailabilityCallback

> XPackageChunkAvailabilityCallback

A user-defined callback used by [XPackageEnumerateChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratechunkavailability.md).

## Syntax

```cpp theme={null}
bool XPackageChunkAvailabilityCallback(  
         void* context,  
         const XPackageChunkSelector* selector,  
         XPackageChunkAvailability availability  
)  
```

### Parameters

*context*   \_In\_\
Type: void\*

The context passed to [XPackageEnumerateChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratechunkavailability.md).

*selector*   \_In\_\
Type: [XPackageChunkSelector\*](https://docs.xbox.com/reference/system/xpackage/structs/xpackagechunkselector.md)

The selector list passed to [XPackageEnumeratePackages](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratepackages.md).

*availability*   \_In\_\
Type: [XPackageChunkAvailability](https://docs.xbox.com/reference/system/xpackage/enums/xpackagechunkavailability.md)

The availability of the matching chunks.

### Return value

Type: bool

To continue enumerating, return true. To stop enumerating, return false.

## Remarks

**XPackageChunkAvailabilityCallback** is a function callback passed to [XPackageEnumerateChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratechunkavailability.md). It's invoked for each element of the enumeration. To continue enumerating, return true from this callback; to stop enumerating, return false.

## Requirements

**Header:** XPackage.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XPackage](https://docs.xbox.com/reference/system/xpackage/xpackage_members.md)\
[Streaming Installation and Intelligent Delivery](https://docs.xbox.com/build/core-features/common/packaging/overviews/streaming_install-intelligent_delivery.md)
[XPackageEnumerateChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratechunkavailability.md)


## Related topics

- [XPackageEnumerateChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratechunkavailability.md)
- [XPackage (API contents)](https://docs.xbox.com/reference/system/xpackage/xpackage_members.md)
- [XPackageChunkAvailability](https://docs.xbox.com/reference/system/xpackage/enums/xpackagechunkavailability.md)
- [XPackageFindChunkAvailability](https://docs.xbox.com/reference/system/xpackage/functions/xpackagefindchunkavailability.md)
- [Intelligent Delivery: custom tag specifiers](https://docs.xbox.com/build/core-features/common/packaging/intelligentdelivery-custom.md)
