Skip to main content

IDStorageFactoryX::OpenFile

Opens a file for DirectStorage access.

Syntax

Parameters

path   _In_z_
Type: WCHAR *
Path of the file to be opened. riid
Type: REFIID
Specifies the DirectStorage file interface, such as __uuidof(IDStorageFileX). ppv   _COM_Outptr_
Type: void **
Receives an object representing the opened file.

Return value

Type: HRESULT Standard HRESULT error code.

Remarks

The specified file must be stored on an NVM Express (NVMe) device that is supported by DirectStorage. A file is implicitly closed when the last reference to the matching IDStorageFileX object is released. To explicitly close a file, call IDStorageFileX::Close. For more information, see the “IDStorageFileX” section in DirectStorage Overview.

Requirements

Header: dstorage_xs.h Library: dstorage_xs.lib Supported platforms: XBOX Series consoles

See also

IDStorageFactoryX
DStorage
Last modified on August 20, 2026