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

# XPackageEstimateDownloadSize

> XPackageEstimateDownloadSize

# XPackageEstimateDownloadSize

지정된 설치 선택자와 일치하는 청크의 다운로드 크기를 계산합니다.

## 구문

```cpp theme={null}
HRESULT XPackageEstimateDownloadSize(  
         const char* packageIdentifier,  
         uint32_t selectorCount,  
         XPackageChunkSelector* selectors,  
         uint64_t* downloadSize,  
         bool* shouldPresentUserConfirmation  
)  
```

### 매개 변수

*packageIdentifier*   \_In\_z\_\
형식: char\*

디스크에 설치된 패키지를 고유하게 식별하는 문자열입니다. 패키지 식별자에 대한 자세한 내용은 [다운로드 가능한 콘텐츠(DLC) 관리 및 라이선스](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-manage-and-license-optional-packages)를 참조하세요.

*selectorCount*   \_In\_\
형식: uint32\_t

*selectors* 매개 변수의 선택자 수입니다.

*selectors*   \_In\_reads\_(selectorCount)\
형식: [XPackageChunkSelector\*](/reference/system/xpackage/structs/xpackagechunkselector)

작업할 청크를 지정하는 선택자 배열입니다.

*downloadSize*   \_Out\_\
형식: uint64\_t\*

반환 시 지정된 설치 선택자의 다운로드 크기를 포함합니다.

*shouldPresentUserConfirmation*   \_Out\_opt\_\
형식: bool\*

다운로드에 사용자의 확인이 필요한 경우 true를 반환하고, 그렇지 않으면 false를 반환합니다.

### 반환 값

형식: HRESULT

HRESULT 성공 또는 오류 코드입니다.

## 설명

<Note>이 함수는 시간에 민감한 스레드에서 호출해서는 안전하지 않습니다. 자세한 내용은 [시간에 민감한 스레드](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)를 참조하세요.</Note>

*shouldPresentUserConfirmation* 매개 변수가 제공되는 경우, 예상 다운로드 크기가 사용자에게 다운로드 크기 수락을 요청할 정도로 큰 경우 true로 설정됩니다.

다음 예제에서는 레이싱 게임의 트랙 이름을 받아 트랙이 설치되어 있지 않은 경우 해당 트랙의 다운로드 크기를 출력합니다.

```cpp theme={null}
HRESULT ListDownloadSize(char* trackName)
{
    XPackageChunkSelector selector;
    selector.type = XPackageChunkSelectorType::Tag;
    selector.tag = trackName;

    char id[XPACKAGE_IDENTIFIER_MAX_LENGTH];
    HRESULT hr = XPackageGetCurrentProcessPackageIdentifier(_countof(id), id);
    if (FAILED(hr)) return hr;

    XPackageChunkAvailability availability;
    hr = XPackageFindChunkAvailability(id, 1, &selector, &availability);
    if (FAILED(hr)) return hr;

    if (availability == XPackageChunkAvailability::Installable)
    {
        uint64_t downloadSize;
        hr = XPackageEstimateDownloadSize(id, 1, &selector, &downloadSize, nullptr);
        if (FAILED(hr)) return hr;

        printf("Download Size for track %s: %I64u\n", trackName, downloadSize);
    }

    return hr;
}
```

## 요구 사항

**헤더:** XPackage.h

**라이브러리:** xgameruntime.lib

**지원 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 개념 문서

* [시간에 민감한 스레드](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 함께 보기

[XPackage](/reference/system/xpackage/xpackage_members)\
[스트리밍 설치 및 Intelligent Delivery](/build/core-features/common/packaging/overviews/streaming_install-intelligent_delivery)


## Related topics

- [XPackageInstallChunksAsync](/ko/reference/system/xpackage/functions/xpackageinstallchunksasync.md)
- [XPackageInstallChunks](/ko/reference/system/xpackage/functions/xpackageinstallchunks.md)
- [XPackage](/ko/reference/system/xpackage/xpackage_members.md)
- [GDK용 Unity C# API 래퍼](/ko/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreDownloadPackageUpdatesAsync](/ko/reference/system/xstore/functions/xstoredownloadpackageupdatesasync.md)
