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

# XtfGetAumid

> XtfGetAumid

# XtfGetAumid

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

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

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

<a id="retvalSection" />

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

<a id="remarksSection" />

## 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](/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m) or [XtfRegisterNetworkSharePackage](/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m) function to register a package.

Before calling this function, use the [XtfGetcountofAppUserModelIds](/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m) 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](/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m) function to retrieve the full name of a registered package. For more information about packages, see [Packaging](/build/core-features/common/packaging/gc-packaging-toc).

<a id="requirements" />

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

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

<a id="seealsoSection" />

## See also

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


## Related topics

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