Hi
I agree with Nikolay's suggestion, because ExitWindowsEx API is used to log
off current user(The caller).
For detailed information, you may take a look at the MSDN.
The ExitWindowsEx function returns as soon as it has initiated the shutdown
process. The shutdown or logoff then proceeds asynchronously. The function
is designed to stop all processes in the caller's logon session. Therefore,
if you are not the interactive user, the function can succeed without
actually shutting down the computer.
ExitWindowsEx
http://msdn.microsoft.com/library/de...us/sysinfo/bas
e/exitwindowsex.asp
Also here is link about WTSLogoffSession in vb6, I think it will be
migrated to vb.net easier.
BTW: Long in vb6 means 32bit while in vb.net long means 64bit. So in the
vb.net you can use int32 to replace the long in vb6.
Monolithic TS API Wrapper
http://dev.remotenetworktechnology.com/api/wtsapi.htm
If you still have any concern, please feel free to post here.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.