System-defined ECPs

[!NOTE]

一些信息与预发布产品相关,在商业发行之前可能会发生实质性修改。 Microsoft 对此处提供的信息不提供任何明示或暗示的保证。

此页面列出并描述系统定义的额外创建参数 (ECP)。 The operating system defines these ECPs in the Ntifs.h header file.

These system-defined ECPs attach the specified extra information to the IRP_MJ_CREATE operation on a file. 文件系统堆栈的元素可以查询 ECP 以获取额外信息。

Typically, a filter that processes the IRP_MJ_CREATE operation on a file and then passes the file down to filters below it must not attach and spoof any of the system-defined ECPs to the IRP_MJ_CREATE operation on the file.

Similarly, a kernel-mode driver that processes and issues IRP_MJ_CREATE operations on files must not attach and spoof any system-defined ECPs to the IRP_MJ_CREATE operations on the files.

筛选器驱动程序应将系统定义的 ECP 视为只读。 你只能使用它们来检索信息。

限制筛选器驱动程序附加以下任何系统定义的 ECP 的一个例外是筛选器驱动程序实现分层文件系统。 It does this by owning file objects and by issuing its own IRP_MJ_CREATE operations on files below its filter, in response to the IRP_MJ_CREATE operation on a file that the filter driver services on its own file objects. Such a filter driver should propagate any ECP_LIST context structure lists from the original IRP_MJ_CREATE operation on a file to the IRP_MJ_CREATE operations that the filter driver issues below it. By propagating these ECP lists, the filter driver ensures that any filters below the filter that issues the IRP_MJ_CREATE operations are aware of the context of the original IRP_MJ_CREATE operation.

ECP GUID ECP 上下文结构和含义
ECP_TYPE_CLFS_CREATE_CONTAINER The GUID used to identify the CREATE_REDIRECTION_ECP_CONTEXT ECP context structure. 此 ECP 可以发送到 NTFS,以在卷装载期间插入新的通用日志文件系统 (CLFS) 容器。
ECP_TYPE_IO_STOP_ON_SYMLINK_FILTER_GUID The GUID that identifies the IO_STOP_ON_SYMLINK_FILTER_ECP_v0 ECP context structure. 此 ECP 将 IO_STOP_ON_SYMLINK 的行为限制为仅对指定的重分析标记执行操作。
ECP_TYPE_OPEN_REPARSE_GUID The GUID that identifies the OPEN_REPARSE_LIST ECP context structure. 此 ECP 支持调用方打开特定的重新分析点,而不会抑制所有重新分析点类的重新分析行为。
GUID_ECP_ATOMIC_CREATE The GUID that identifies the ATOMIC_CREATE_ECP_CONTEXT ECP context structure. 此 ECP 允许在创建过程中以原子方式对文件执行某些补充操作。
GUID_ECP_CLOUDFILES_ATTRIBUTION 标识云文件归因的 ECP 的 GUID。
GUID_ECP_CREATE_REDIRECTION 用于标识 ECP 的 GUID,可发送该 ECP 来查询特定创建操作的文件重定向状态。
GUID_ECP_CSV_DOWN_LEVEL_OPEN The GUID that identifies the CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT ECP context structure. 群集共享卷文件系统 (CSVFS) 将此 ECP 发送到元数据节点 (MDS),并包含有关创建类型的信息。
GUID_ECP_CSV_QUERY_FILE_REVISION The GUID that identifies the CSV_QUERY_FILE_REVISION_ECP_CONTEXT ECP context structure. 此 ECP 可以发送到 CSVFS 以请求文件修订号。
GUID_ECP_CSV_QUERY_FILE_REVISION_FILE_ID_128 The GUID that identifies the CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128 ECP context structure. 此 ECP 可以发送到 CSVFS 以请求文件修订号。
GUID_ECP_CSV_SET_HANDLE_PROPERTIES The GUID that identifies the CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT ECP context structure. 此 ECP 可发送给 CSVFS,以设置其应如何处理在此打开状态下到达的 IO 的属性。
GUID_ECP_DUAL_OPLOCK_KEY The GUID that identifies the DUAL OPLOCK_KEY_ECP_CONTEXT ECP context structure. Like the OPLOCK_KEY_ECP_CONTEXT structure, DUAL OPLOCK_KEY_ECP_CONTEXT is used to attach an oplock key to the open file request. With DUAL OPLOCK_KEY_ECP_CONTEXT, a parent key can also be set to provide an oplock for a target file's directory.
GUID_ECP_IO_DEVICE_HINT A GUID that identifies the IO_DEVICE_HINT_ECP_CONTEXT structure. 设备提示用于帮助名称提供程序微型筛选器驱动程序跟踪新设备的重新分析目标。
GUID_ECP_NETWORK_APP_INSTANCE The GUID that identifies the NETWORK_APP_INSTANCE_ECP_CONTEXT ECP context structure. 故障转移群集中的客户端应用程序可能在群集的节点上打开一组文件。 The file objects are tagged to an application by an instance identifier in the NETWORK_APP_INSTANCE_ECP_CONTEXT structure. 故障转移时,辅助节点可以使用以前缓存的应用程序实例标识符来验证客户端应用程序对打开的文件的访问权限。
GUID_ECP_NETWORK_APP_INSTANCE_VERSION The GUID that identifies the NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT structure, which is an ECP context for an application to provide its instance ID. This ECP must accompany a NETWORK_APP_INSTANCE_ECP_CONTEXT (GUID_ECP_NETWORK_APP_INSTANCE) to be valid.
GUID_ECP_NETWORK_OPEN_CONTEXT The GUID that identifies the NETWORK_OPEN_ECP_CONTEXT ECP context structure and is used to attach extra information for network redirectors. This GUID also identifies the NETWORK_OPEN_ECP_CONTEXT_V0 structure for drivers that run on Windows 7 and later versions of Windows and that must interpret network ECP contexts on files that reside on Windows Vista.
GUID_ECP_NFS_OPEN The GUID that identifies the NFS_OPEN_ECP_CONTEXT structure. 网络文件系统 (NFS) 服务器将 NFS_OPEN_ECP_CONTEXT 结构附加到打开的文件请求。 在 NFS 服务器为满足客户端请求而发出的任何打开文件请求中,NFS 服务器都会使用此 GUID。 然后,文件系统堆栈可以确定 NFS_OPEN_ECP_CONTEXT 是否附加到打开的文件请求。 根据 NFS_OPEN_ECP_CONTEXT 中的信息,文件系统堆栈可以确定请求打开文件的客户端以及原因。
GUID_ECP_OPEN_PARAMETERS The GUID that identifies the ECP_OPEN_PARAMETERS ECP context structure. 此 ECP 允许调用方指定文件打开的目的,而不会干扰文件上的现有句柄和/或机会锁 (oplock)。
GUID_ECP_OPLOCK_KEY The GUID that identifies the OPLOCK_KEY_ECP_CONTEXT ECP context structure and is used to attach an oplock key to the open file request. Oplock 键允许应用程序打开同一流的多个句柄,而不会中断应用程序自己的 oplock。 有关 oplock 和 oplock 键的详细信息,请参阅 Oplock 语义概述
GUID_ECP_PREFETCH_OPEN The GUID that identifies the PREFETCH_OPEN_ECP_CONTEXT ECP context structure. 预提取器是一个与缓存管理器和内存管理器紧密集成的 OS 组件,可提高磁盘访问效率,从而改善性能。 如果其他组件干扰预提取器,则系统性能会降低,并且可能会死锁。 因此,预提取器将 PREFETCH_OPEN_ECP_CONTEXT 结构附加到文件,以通知预提取器对文件执行打开请求。 This open request is specified by the Context member of PREFETCH_OPEN_ECP_CONTEXT. 其他组件(例如文件系统筛选器驱动程序)可以确定 PREFETCH_OPEN_ECP_CONTEXT 是否附加到该文件,然后采取相应操作。
GUID_ECP_QUERY_ON_CREATE 标识创建时查询文件信息的 ECP 的 GUID。
GUID_ECP_RKF_BYPASS The GUID that identifies the RKF_BYPASS_ECP_CONTEXT ECP context structure.
GUID_ECP_SRV_OPEN The GUID that identifies the SRV_OPEN_ECP_CONTEXT ECP context structure. 服务器将 SRV_OPEN_ECP_CONTEXT 结构附加到打开的文件请求。 在服务器为满足条件客户端请求而发出的任何打开文件请求中,服务器都会使用此 GUID。 然后,文件系统堆栈可以确定 SRV_OPEN_ECP_CONTEXT 是否附加到打开的文件请求。 根据 SRV_OPEN_ECP_CONTEXT 中的信息,文件系统堆栈可以确定请求打开文件的客户端以及原因。 并非所有服务器都创建此 ECP。
GUID_ECP_TYPE_VETO_BINDING Identifies the VETO_BINDING_ECP_CONTEXT ECP context structure. 此 ECP 可用于在系统引导分区上否决绑定链接。 从 Windows 11 版本 24H2 开始提供。