Skip to main content

IDStorageFactoryX::OpenFile

打开供 DirectStorage 访问的文件。

Syntax

Parameters

path   _In_z_
类型:WCHAR *
要打开的文件路径。 riid
类型:REFIID
指定 DirectStorage 文件接口,例如 __uuidof(IDStorageFileX) ppv   _COM_Outptr_
类型:void **
接收代表所打开文件的对象。

Return value

类型:HRESULT 标准 HRESULT 错误代码。

Remarks

指定的文件必须存储在受 DirectStorage 支持的 NVM Express (NVMe) 设备上。 当对应 IDStorageFileX 对象的最后一个引用被释放时,文件会被隐式关闭。若要显式关闭文件,请调用 IDStorageFileX::Close 有关详细信息,请参阅 DirectStorage 概述 中的“IDStorageFileX”一节。

Requirements

头文件: dstorage_xs.h 库: dstorage_xs.lib 受支持的平台: XBOX Series 主机

See also

IDStorageFactoryX
DStorage
最后修改于 2026年8月24日