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

# IDStorageFactoryX::OpenFile

> IDStorageFactoryX::OpenFile

# IDStorageFactoryX::OpenFile

DirectStorage 접근을 위해 파일을 엽니다.

## 구문

```cpp theme={null}
HRESULT OpenFile(  
         const WCHAR *path,  
         REFIID riid,  
         void **ppv  
)  
```

### 매개 변수

*path*   \_In\_z\_\
형식: WCHAR \*

열 파일의 경로입니다.

*riid*\
형식: REFIID

DirectStorage 파일 인터페이스를 지정합니다(예: `__uuidof(IDStorageFileX)`).

*ppv*   \_COM\_Outptr\_\
형식: void \*\*

열린 파일을 나타내는 개체를 받습니다.

### 반환 값

형식: HRESULT

표준 HRESULT 오류 코드입니다.

## 설명

지정된 파일은 DirectStorage에서 지원하는 NVM Express(NVMe) 디바이스에 저장되어 있어야 합니다.

해당 `IDStorageFileX` 개체에 대한 마지막 참조가 해제되면 파일은 암시적으로 닫힙니다. 파일을 명시적으로 닫으려면 [IDStorageFileX::Close](/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_close)를 호출합니다.

자세한 내용은 [DirectStorage 개요](/build/console-features/storage/directstorage/directstorage-overview)의 "IDStorageFileX" 섹션을 참조하세요.

## 요구 사항

**헤더:** dstorage\_xs.h

**라이브러리:** dstorage\_xs.lib

**지원되는 플랫폼:** XBOX Series 콘솔

## 함께 보기

[IDStorageFactoryX](/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx)\
[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [IDStorageFileX](/ko/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex.md)
- [IDStorageFileX::Close](/ko/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_close.md)
- [IDStorageFileX::GetHandle](/ko/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_gethandle.md)
- [DirectStorage 개요](/ko/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageFactoryX](/ko/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx.md)
