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.

MethodDescription
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.

PropertyAccess typeDescription

AdsPath

Read-only

Gets the object's ADsPath that uniquely identifies this object from all others.

Class

Read-only

Gets the name of the object's schema class.

Computer

Read-only

Gets the name of the client computer.

ComputerPath

Read-only

Gets the ADsPath of the computer object for client computer.

ConnectTime

Read-only

Gets the number of minutes elapsed since the session start.

GUID

Read-only

Gets the GUID of the object as stored in the underlying directory store.

IdleTime

Read-only

Gets the number of minutes that the session has been idle.

Name

Read-only

Gets the object's relative name.

Parent

Read-only

Gets the ADsPath string for the parent of the object.

Schema

Read-only

Gets the ADsPath string to the schema class object for this object.

User

Read-only

Gets the name of user for the session.

UserPath

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

Iads.h

DLL

Activeds.dll

IID

IID_IADsSession is defined as 398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9

 

 

Show: