[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

logoff command - C++ console

hi experts,


What is the command to logoff current account in windwos XP?
0
ALNMOO
Asked:
ALNMOO
  • 2
1 Solution
 
Jase-CoderCommented:
hi try:

ExitWindowsEx(EWX_LOGOFF, 0);
0
 
craigwardmanCommented:
or use the shell command:

shutdown -l

(thats an L btw..)


0
 
Jase-CoderCommented:
to use the shell command you can use

ShellExecute(NULL, "open" "shutdown.exe", "-l", 0, SW_SHOW);
0
 
ALNMOOAuthor Commented:
This what is worked with me:


ExitWindowsEx(EWX_LOGOFF | EWX_FORCE, 0);

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now