10.2.1 IADsSession

The IADsSession interface is used to get and set the properties of the Session object. The interface definition is as follows:

[ object, uuid(IID_IADsSession), oleautomation, dual ]

interface IADsSession: IADs

{

// Read-only properties.

[propget]

HRESULT User ([out, retval]BSTR *pbstrUser);

[propget]

HRESULT UserPath ([out, retval]BSTR *pbstrUserPath);

[propget]

HRESULT Computer ([out, retval]BSTR *pbstrComputer);

[propget]

HRESULT ComputerPath ([out, retval]BSTR *pbstrComputerPath);

[propget]

HRESULT ConnectTime ([out, retval]long *plConnectTime);

[propget]

HRESULT IdleTime ([out, retval]long *plIdleTime);

};

Method

Syntax

Description

User

String

Gets the name of the user of the session.

UserPath

ADsPath

Gets the ADsPath of the user object for the user of this session

Computer

String

Gets the name of the client workstation.

ComputerPath

ADsPath

Gets the ADsPath of the computer object for the client workstation

ConnectTime

Integer

Gets the number of minutes that have elapsed since the session started.

IdleTime

Integer

Gets the idle time of the session, in minutes.