Log Off The Current User

Category:
System/API
Type:
Snippets
Difficulty:
Intermediate
Author:
Anonymous

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
You can use this 3 line Windows API call to log off the current user. This can be added to desktop management functions, for example, when you need to take over a PC for administration.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: