IADsSession interface
The IADsSession interface is a dual interface that inherits from IADs. It is designed to represent an active session for file service across a network.
Members
The IADsSession interface inherits from IDispatch and IADs. IADsSession also has these types of members:
Methods
The IADsSession interface has these methods.
| Method | Description |
|---|---|
| Get |
Gets the value for a property by name. |
| GetEx |
Gets the value for a single or multi-valued property by name. |
| GetInfo |
Loads the property values of this object from the underlying directory store. |
| GetInfoEx |
Loads specific property values of this object from the underlying directory store. |
| Put |
Sets the value for a property by name. |
| PutEx |
Sets the value for a single or multi-valued property by name. |
| SetInfo |
Persists the changes on this object to the underlying directory store. |
Properties
The IADsSession interface has these properties.
| Property | Access type | Description |
|---|---|---|
|
Read-only |
Gets the object's ADsPath that uniquely identifies this object from all others. | |
|
Read-only |
Gets the name of the object's schema class. | |
|
Read-only |
Gets the name of the client computer. | |
|
Read-only |
Gets the ADsPath of the computer object for client computer. | |
|
Read-only |
Gets the number of minutes elapsed since the session start. | |
|
Read-only |
Gets the GUID of the object as stored in the underlying directory store. | |
|
Read-only |
Gets the number of minutes that the session has been idle. | |
|
Read-only |
Gets the object's relative name. | |
|
Read-only |
Gets the ADsPath string for the parent of the object. | |
|
Read-only |
Gets the ADsPath string to the schema class object for this object. | |
|
Read-only |
Gets the name of user for the session. | |
|
Read-only |
Gets the ADsPath of the user object. |
Remarks
When a remote user opens resources on a target computer, an active session is established between the remote user and that computer. Many resources can be opened in a single active session. ADSI represents this process with a session object that implements this interface.
Call the methods of this interface to examine session-specific data, for example, who is using the session, which computer is used, and the time elapsed for the current session.
Sessions are managed by the file service. To obtain session objects, first bind to this service ("LanmanServer" or "FPNW").
Examples
The following code example shows how to bind to a session.
Dim fso as IADsFileServiceOperations Dim ss as IADsCollection On Error GoTo Cleanup Set fso = GetObject("WinNT://myComputer/LanmanServer") Set ss = fso.Sessions ' Insert code to access session data. Cleanup: If (Err.Number<>0) Then MsgBox("An error has occurred. " & Err.Number) End If Set fso = Nothing Set ss = Nothing
Requirements
|
Minimum supported client |
Windows Vista |
|---|---|
|
Minimum supported server |
Windows Server 2008 |
|
Header |
|
|
DLL |
|
|
IID |
IID_IADsSession is defined as 398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9 |