How do I logoff a user via a Windows Service? 

I found this example here but it will not work in a service.
<http://www.c-sharpcorner.com/UploadFile/thiagu304/desktopfunctions02112007140806PM/desktopfunctions.aspx>