Compartir a través de


MSFT_SmbOpenFile class

Represents a file that is opened on an SMB server from the server's perspective.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

[dynamic, provider("smbwmiv2"), ClassVersion("30")]
class MSFT_SmbOpenFile
{
  uint64  FileId;
  uint32  SmbInstance;
  uint64  SessionId;
  string  ScopeName;
  string  ClusterNodeName;
  string  Path;
  string  ShareRelativePath;
  string  ClientComputerName;
  string  ClientUserName;
  uint32  Permissions;
  uint32  Locks;
  boolean ContinuouslyAvailable;
  boolean Encrypted;
  boolean Signed;
};

Members

The MSFT_SmbOpenFile class has these types of members:

Methods

The MSFT_SmbOpenFile class has these methods.

Method Description
ForceClose Forcibly closes a file that is open on behalf of an SMB client. Unsaved data might be lost.

Properties

The MSFT_SmbOpenFile class has these properties.

ClientComputerName

Data type: string

Access type: Read-only

The name of the computer from which the file handle was opened.

ClientUserName

Data type: string

Access type: Read-only

The name of the user that opened the file handle.

ClusterNodeName

Data type: string

Access type: Read-only

Name of the computer that is actually serving this handle. This is meaningful when the server is part of a cluster and the scope of the session might be served by several servers in the cluster.

ContinuouslyAvailable

Data type: boolean

Access type: Read-only

Indicates whether this handle supports continuous availability. Continuously available handles will survive server failovers without any interruption to the client application.

Encrypted

Data type: boolean

Access type: Read-only

Indicates whether the SMB connection is encrypted. For more information, see SMB Encryption.

FileId

Data type: uint64

Access type: Read-only

Qualifiers: key

An identifier that uniquely identifies the open file handle.

Locks

Data type: uint32

Access type: Read-only

Number of locks held on this handle.

Path

Data type: string

Access type: Read-only

Specified the server-local path to the opened file.

Permissions

Data type: uint32

Access type: Read-only

The access mask for this handle.

ScopeName

Data type: string

Access type: Read-only

Scope name of this handle. It can be * (meaning no scope) or a file server resource name (if the server is part of a cluster). ScopeName should match the scope name of the associated session.

SessionId

Data type: uint64

Access type: Read-only

An identifier that identifies the session in which this file handle was opened.

ShareRelativePath

Data type: string

Access type: Read-only

Specifies the share-relative path to the opened file.

Signed

Data type: boolean

Access type: Read-only

Indicates whether the SMB connection is encrypted. If the SMB connection is encrypted (the Encrypted property is True) then the Signed property will be set to False, even though an encrypted connection is also signed. For more information, see Require SMB Security Signatures.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012 and Windows 8: This property is not supported before Windows Server 2016 and Windows 10.

SmbInstance

Data type: uint32

Access type: Read-only

The identifier of the SMB server instance that hosts the shares.

Windows Server 2012 and Windows 8: This property is not supported before Windows Server 2012 R2 and Windows 8.1.

Default (0)

CSV (1)

Represents a Cluster Shared Volume (CSV).

Windows 10 and Windows 8.1: Cluster Shared Volumes are only supported on Windows Server systems.

SBL (2)

Represents a Software Storage Bus used in Storage Spaces Direct.

Windows Server 2012 R2: This value is not supported before Windows Server 2016.

Windows 10 and Windows 8.1: Storage Spaces Direct is only supported on Windows Server systems.

SR (2)

Represents a Storage Replica (SR).

Windows Server 2012 R2: This value is not supported before Windows Server 2016.

Windows 10 and Windows 8.1: Storage Replica is only supported on Windows Server systems.

Requirements

Minimum supported client
Windows 8
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\Smb
MOF
SmbWmiV2.mof
DLL
SmbWmiV2.dll