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

# XPackageGetMountPath

> XPackageGetMountPath

# XPackageGetMountPath

탑재된 설치의 경로를 가져옵니다.

## 구문

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

### 매개 변수

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

탑재에 대한 핸들입니다.

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

*path* 매개 변수의 크기(바이트)입니다. 필요한 경로 크기를 확인하려면 [XPackageGetMountPathSize](/reference/system/xpackage/functions/xpackagegetmountpathsize)를 사용합니다.

*path*   \_Out\_writes\_(pathSize)\
형식: char\*

탑재된 설치의 경로입니다.

### 반환 값

형식: HRESULT

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

## 설명

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

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

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

콘텐츠 패키지만 탑재할 수 있습니다. 다른 게임을 탑재하려고 하면 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 콘솔

## 개념 문서

* [XBOX 콘솔의 로컬 스토리지](/build/console-features/storage/local-storage)
* [시간에 민감한 스레드](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)
[XPackageGetMountPathSize](/reference/system/xpackage/functions/xpackagegetmountpathsize)


## Related topics

- [XPackageGetMountPathSize](/ko/reference/system/xpackage/functions/xpackagegetmountpathsize.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)
