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

# XtfGetAumid

> XtfGetAumid

Gets the Application User Model ID (AUMID) at the specified index from a package information object.

## Syntax

```cpp theme={null}
HRESULT XtfGetAumid(
         XtfPackageInfo packageInfo,
         UINT32 aumidIndex,
         PWSTR aumid,
         UINT32 *aumidBufferLength
)  
```

### Parameters

*packageInfo*\
Type: XtfPackageInfo

\[in] The pointer to the information object for a package.

*aumidIndex*\
Type: UINT32

\[in] Index of the AUMID in the package.

*aumid*\
Type: PWSTR

\[out, optional] The AUMID at the index specified in `aumidIndex` for the package.

*aumidBufferLength*\
Type: UINT32 \*

\[in, out] The length, in **WCHAR**, allocated for `aumid`.

### Return value

Type: HRESULT

Returns `S_OK` if successful. If `aumid` is not large enough, this function returns `HRESULT_FROM_WIN32(ERROR_MORE_DATA)` and the required buffer length is returned in `aumidBufferLength`.

## Remarks

Use this function to get the AUMID at the index specified in `aumidIndex` from the information object for a registered package. A pointer to a package information object is returned by calling either the [XtfRegisterPackage](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m.md) or [XtfRegisterNetworkSharePackage](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m.md) function to register a package.

Before calling this function, use the [XtfGetcountofAppUserModelIds](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m.md) function to get the count of AUMIDs for the package. If you specify a value in `aumidIndex` that's equal to or greater than the value returned by `XtfGetcountofAppUserModelIds`, an error occurs. Similarly, an error occurs if there's no data to retrieve at the index specified in `aumidIndex`.

You can also use the [XtfGetPackageFullName](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m.md) function to retrieve the full name of a registered package. For more information about packages, see [Packaging](https://docs.xbox.com/build/core-features/common/packaging/gc-packaging-toc.md).

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

**Supported platforms:** Windows (for XBOX console tools)

## See also

[XTF Transport Errors (NDA topic)](https://docs.xbox.com/tools/tools-console/commandlinetools/xtf-transport-errors.md)\
[XtfRegisterPackage](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m.md)\
[XtfRegisterNetworkSharePackage](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m.md)\
[Additional Xtf APIs](https://docs.xbox.com/reference/tools/xtf/xtfapi/atoc-xtfapi.md)


## Related topics

- [XtfGetTitleOSState](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgettitleosstate-xtfapi-xbox-windows-m.md)
- [XtfGetCountofAppUserModelIds](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m.md)
- [XtfGetTitleOSFourPartVersion](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgettitleosfourpartversion-xtfapi-xbox-windows-m.md)
- [XtfGetPackageFullName](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m.md)
- [XtfRegisterPackageOnDrive](https://docs.xbox.com/reference/tools/xtf/xtfapi/functions/xtfregisterpackageondrive-xtfapi-xbox-windows-m.md)
