<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-ZA" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">What is this ‘session.Logon();’ doing in here?</span></p>

</div></div></blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-ZA" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I don’t quite see where the actual logout is being sent</span></p>

</div></div></blockquote><div><br></div><div>These are related -- the Logon() and Logout() function names are a bit misleading.  They don't directly cause a logon/logout.  Rather, they set the state (mainly the IsEnabled property) that cause will ultimately cause logon/logout message (if necessary) during the Session's main loop (see Session::Next() if you are curious).</div>

</div>