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

# XPackageGetPackageKind

> XPackageGetPackageKind

Returns the type of installation package identified by a package identifier.

## Syntax

```cpp theme={null}
HRESULT XPackageGetPackageKind(  
         _In_z_ const char* packageIdentifier,  
         _Out_ XPackageKind* kind  
)
```

### Parameters

*packageIdentifier*   \_In\_z\_\
Type: char\*

A string that uniquely identifies the installed package on the disk. For more information about package identifiers, see [Manage and license downloadable content (DLC)](https://docs.xbox.com/publishing/xstore-commerce/xstore-dlc.md).

*kind*   \_Out\_\
Type: [XPackageKind](https://docs.xbox.com/reference/system/xpackage/enums/xpackagekind.md)\*

On return, contains the [XPackageKind](https://docs.xbox.com/reference/system/xpackage/enums/xpackagekind.md) value that describes the package.

### Return value

Type: HRESULT

`S_OK` on success, or an error code otherwise.

## Remarks

Use `XPackageGetPackageKind` when you have a package identifier and need to determine whether it refers to a game, a downloadable content (DLC) package, or a Publisher Content package. When you already know the kind you want to work with, prefer passing the corresponding [XPackageKind](https://docs.xbox.com/reference/system/xpackage/enums/xpackagekind.md) value to [XPackageEnumeratePackages](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratepackages.md) so that enumeration returns only matching packages.

Refer to the following code example.

```cpp theme={null}
XPackageKind kind;
HRESULT hr = XPackageGetPackageKind(packageIdentifier, &kind);
if (SUCCEEDED(hr) && kind == XPackageKind::PublisherContent)
{
    // Handle Publisher Content.
}
```

## Requirements

**Header:** XPackage.h

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

## See also

[XPackage](https://docs.xbox.com/reference/system/xpackage/xpackage_members.md)\
[XPackageKind](https://docs.xbox.com/reference/system/xpackage/enums/xpackagekind.md)\
[XPackageEnumeratePackages](https://docs.xbox.com/reference/system/xpackage/functions/xpackageenumeratepackages.md)\
[Publisher Content packages](https://docs.xbox.com/build/core-features/common/packaging/packaging-publisher-content.md)


## Related topics

- [Publisher Content packages](https://docs.xbox.com/build/core-features/common/packaging/packaging-publisher-content.md)
- [XPackage (API contents)](https://docs.xbox.com/reference/system/xpackage/xpackage_members.md)
- [XPackageKind](https://docs.xbox.com/reference/system/xpackage/enums/xpackagekind.md)
- [XPackageGetCurrentProcessPackageIdentifier](https://docs.xbox.com/reference/system/xpackage/functions/xpackagegetcurrentprocesspackageidentifier.md)
- [Packages (classic experience)](https://docs.xbox.com/publishing/game-publishing/concepts/packages-overview.md)
