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

# XPackageGetMountPathSize

> XPackageGetMountPathSize

# XPackageGetMountPathSize

[XPackageGetMountPath](/reference/system/xpackage/functions/xpackagegetmountpath)에서 반환된 탑재 경로를 담을 배열에 필요한 크기를 가져옵니다.

## 구문

```cpp theme={null}
HRESULT XPackageGetMountPathSize(  
         XPackageMountHandle mount,  
         size_t* pathSize  
)  
```

### 매개 변수

*mount*   \_In\_\
형식: XPackageMountHandle

탑재된 설치에 대한 핸들입니다.

*pathSize*   \_Out\_\
형식: size\_t\*

반환 시 배열에 필요한 크기를 포함합니다.

### 반환 값

형식: HRESULT

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

## 설명

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

**XPackageGetMountPathSize**와 [XPackageGetMountPath](/reference/system/xpackage/functions/xpackagegetmountpath)는 함께 사용되어 패키지 콘텐츠의 파일 경로를 반환합니다.

[XPackageGetMountPath](/reference/system/xpackage/functions/xpackagegetmountpath)는 지정된 패키지 식별자를 탑재하고 이에 대한 탑재 핸들을 반환합니다. 이 작업은 몇 초가 걸릴 수 있습니다. 패키지 식별자에 대한 자세한 내용은 [다운로드 가능한 콘텐츠(DLC) 관리 및 라이선스](https://learn.microsoft.com/gaming/gdk/docs/store/commerce/fundamentals/xstore-manage-and-license-optional-packages)를 참조하세요.

콘텐츠 패키지만 탑재할 수 있습니다. 다른 게임을 탑재하려고 하면 E\_ACCESS\_DENIED가 발생합니다.

다음 코드 예제는 일반적으로 패키지가 탑재되는 방법을 보여줍니다.

```cpp theme={null}
HRESULT MountDlc(char* dlcIdentifier)
{
    XPackageMountHandle mountHandle;
    HRESULT hr = XPackageMount(dlcIdentifier, &mountHandle);
    if (FAILED(hr)) return hr;

    size_t pathSize;
    hr = XPackageGetMountPathSize(mountHandle, &pathSize);
    if (FAILED(hr))
    {
        XPackageCloseMountHandle(mountHandle);
        return hr;
    }

    char* path = new (std::nothrow) char[pathSize];
    if (path == nullptr)
    {
        XPackageCloseMountHandle(mountHandle);
        return E_OUTOFMEMORY;
    }

    hr = XPackageGetMountPath(mountHandle, pathSize, path);
    if (FAILED(hr))
    {
        XPackageCloseMountHandle(mountHandle);
        delete[] path;
        return hr;
    }

    printf("Dlc %s mounted at path %s\n", dlcIdentifier, path);

    delete[] path;

    // 이것이 마지막 핸들인 경우 DLC 경로를 마운트 해제합니다.
    XPackageCloseMountHandle(mountHandle);
    return S_OK;
}
```

## 요구 사항

**헤더:** 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)\
[PC 및 XBOX One용 다운로드 가능 콘텐츠 패키지(DLC)를 만들고 사용하는 방법](/build/core-features/common/packaging/packaging-downloadable-content-dlc)\
[XPackageGetMountPath](/reference/system/xpackage/functions/xpackagegetmountpath)


## Related topics

- [XPackageGetMountPath](/ko/reference/system/xpackage/functions/xpackagegetmountpath.md)
- [XPackageCloseMountHandle](/ko/reference/system/xpackage/functions/xpackageclosemounthandle.md)
- [XPackageMountWithUiAsync](/ko/reference/system/xpackage/functions/xpackagemountwithuiasync.md)
- [XPackage](/ko/reference/system/xpackage/xpackage_members.md)
- [GDK용 Unity C# API 래퍼](/ko/build/gdk-and-engines/unity/unity-api-wrappers.md)
