3.3.4.20.2.1 OnServiceControlSessionChange

 <xsd:element name="OnServiceControlSessionChange">
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element minOccurs="1" maxOccurs="1" name="dwEventType" type="xsd:unsignedInt"/>
       <xsd:element minOccurs="1" maxOccurs="1" name="idSession" type="xsd:unsignedInt"/>
     </xsd:sequence>
   </xsd:complexType>
 </xsd:element>

dwEventType: Contains the type of change event with the following possible values:

Value

Meaning

1

WTS_CONSOLE_CONNECT

2

WTS_CONSOLE_DISCONNECT

3

WTS_REMOTE_CONNECT

4

WTS_REMOTE_DISCONNECT

5

WTS_SESSION_LOGON

6

WTS_SESSION_LOGOFF

7

WTS_SESSION_LOCK

8

WTS_SESSION_UNLOCK

9

WTS_SESSION_REMOTE_CONTROL

10

WTS_SESSION_CREATE

11

WTS_SESSION_TERMINATE

idSession: Contains the ID of the remote desktop session being associated with the station.