IADsSession interface (iads.h)
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.
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").
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
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|