NETWORK_OPEN_ECP_CONTEXT structure

The NETWORK_OPEN_ECP_CONTEXT structure is used to interpret network ECP contexts on files.

Syntax


typedef struct _NETWORK_OPEN_ECP_CONTEXT {
  USHORT Size;
  USHORT Reserved;
  struct {
    struct {
      NETWORK_OPEN_LOCATION_QUALIFIER  Location;
      NETWORK_OPEN_INTEGRITY_QUALIFIER Integrity;
      ULONG                            Flags;
    } in;
    struct {
      NETWORK_OPEN_LOCATION_QUALIFIER  Location;
      NETWORK_OPEN_INTEGRITY_QUALIFIER Integrity;
      ULONG                            Flags;
    } out;
  };
} NETWORK_OPEN_ECP_CONTEXT, *PNETWORK_OPEN_ECP_CONTEXT;

Members

Size

The size, in bytes, of this structure.

Reserved

Reserved. Must be set to zero.

( unnamed struct )

A structure that contains restrictions for opening the file and to apply to the file after it is opened.

in

A structure in the DUMMYSTRUCTNAME structure that contains restrictions for opening a file.

Location

A NETWORK_OPEN_LOCATION_QUALIFIER-typed value that specifies the location restriction to attach to the file.

Integrity

This member is currently not implemented and should be ignored.

A NETWORK_OPEN_INTEGRITY_QUALIFIER-typed value that specifies the integrity restriction to attach to the file.

Flags

Supported starting with Windows 7.

A value that specifies attributes for the file. This member is a bitwise OR of any of the flags in the following table.

ValueMeaning

NETWORK_OPEN_ECP_IN_FLAG_DISABLE_HANDLE_COLLAPSING

(0x1)

This flag indicates to the SMB or SMB2 redirector that the incoming open request must not be piggybacked and collapsed onto an existing open handle to the same file.

NETWORK_OPEN_ECP_IN_FLAG_DISABLE_HANDLE_DURABILITY

(0x2)

This flag causes the SMB2 redirector to disable durability on this open handle. For more information about opening a file for durable operation, see Application Requests Creating a File Opened for Durable Operation.

NETWORK_OPEN_ECP_IN_FLAG_DISABLE_OPLOCKS

(0x4)

This flag indicates to the SMB or SMB2 redirector not to grant oplocks for the incoming open request.

This flag is available starting with Windows 8.

NETWORK_OPEN_ECP_IN_FLAG_FORCE_BUFFERED_SYNCHRONOUS_IO_HACK

(0x80000000)

This flag is reserved for internal use and must not be used by applications.

This flag forces the redirector to use synchronous I/O even though the handle was opened for asynchronous I/O.

 

out

A structure in the DUMMYSTRUCTNAME structure that contains information that a file provides after it is opened.

Location

A NETWORK_OPEN_LOCATION_QUALIFIER-typed value that specifies the location restriction to attach to the file.

Integrity

This member is currently not implemented and should be ignored.

A NETWORK_OPEN_INTEGRITY_QUALIFIER-typed value that specifies the integrity restriction to attach to the file.

Flags

Supported starting with Windows 7.

A value that specifies attributes for the file. This member is a bitwise OR of any of the flags in the following table.

ValueMeaning

NETWORK_OPEN_ECP_IN_FLAG_DISABLE_HANDLE_COLLAPSING

(0x1)

This flag indicates to the SMB or SMB2 redirector that the incoming open request must not be piggybacked and collapsed onto an existing open handle to the same file.

NETWORK_OPEN_ECP_IN_FLAG_DISABLE_HANDLE_DURABILITY

(0x2)

This flag causes the SMB2 redirector to disable durability on this open handle. For more information about opening a file for durable operation, see Application Requests Creating a File Opened for Durable Operation.

NETWORK_OPEN_ECP_IN_FLAG_FORCE_BUFFERED_SYNCHRONOUS_IO_HACK

(0x80000000)

This flag is reserved for internal use and must not be used by applications.

This flag forces the redirector to use synchronous I/O even though the handle was opened for asynchronous I/O.

 

Remarks

For information about how to use ECPs to associate extra information with a file when the file is created, see Using Extra Create Parameters with an IRP_MJ_CREATE Operation.

The NETWORK_OPEN_ECP_CONTEXT structure is read-only. You should use it to retrieve information about the network ECP context on a file only. For more information about this issue, see System-Defined ECPs.

If a caller must verify that the file system acknowledged the NETWORK_OPEN_ECP_CONTEXT context structure, the caller should call the FltIsEcpAcknowledged or FsRtlIsEcpAcknowledged routine on the ECP after the operation is complete.

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 must use the NETWORK_OPEN_ECP_CONTEXT_V0 structure instead. Drivers that run on Windows Vista and later versions of Windows use the NETWORK_OPEN_ECP_CONTEXT structure to interpret network ECP contexts on files. However, the DUMMYSTRUCTNAME.in.Flags and DUMMYSTRUCTNAME.out.Flags members are only supported starting with Windows 7.

Requirements

Version

This structure is available starting with Windows Vista.

Header

Ntifs.h (include Ntifs.h)

See also

NETWORK_OPEN_ECP_CONTEXT_V0
NETWORK_OPEN_INTEGRITY_QUALIFIER
NETWORK_OPEN_LOCATION_QUALIFIER

 

 

Send comments about this topic to Microsoft

Show: