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

# XPackageGetPackageKind

> 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)](/publishing/xstore-commerce/xstore-dlc).

*kind*   \_Out\_\
Type: [XPackageKind](/reference/system/xpackage/enums/xpackagekind)\*

On return, contains the [XPackageKind](/reference/system/xpackage/enums/xpackagekind) 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](/reference/system/xpackage/enums/xpackagekind) value to [XPackageEnumeratePackages](/reference/system/xpackage/functions/xpackageenumeratepackages) 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](/reference/system/xpackage/xpackage_members)\
[XPackageKind](/reference/system/xpackage/enums/xpackagekind)\
[XPackageEnumeratePackages](/reference/system/xpackage/functions/xpackageenumeratepackages)\
[Publisher Content packages](/build/core-features/common/packaging/packaging-publisher-content)


## Related topics

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