共用方式為


ServiceBase.OnSessionChange(SessionChangeDescription) 方法

定義

當從終端伺服器會話接收變更事件時執行。

protected:
 virtual void OnSessionChange(System::ServiceProcess::SessionChangeDescription changeDescription);
protected virtual void OnSessionChange(System.ServiceProcess.SessionChangeDescription changeDescription);
abstract member OnSessionChange : System.ServiceProcess.SessionChangeDescription -> unit
override this.OnSessionChange : System.ServiceProcess.SessionChangeDescription -> unit
Protected Overridable Sub OnSessionChange (changeDescription As SessionChangeDescription)

參數

changeDescription
SessionChangeDescription

一個用來識別變更類型的結構。

備註

您必須將屬性設定 CanHandleSessionChangeEvent 為 , true 才能啟用此方法的執行。

適用於

另請參閱