Jump to content



Photo

Windows LogOnOff Screen


  • Please log in to reply
5 replies to this topic

#1 ptrex

ptrex

    Universalist

  • MVPs
  • 2,400 posts

Posted 15 March 2009 - 09:11 PM

Windows LogOnOff Screen

Seems to be an undocumented API call ?

#Include <WinAPI.au3> WinLogOnOff() Func WinLogOnOff() Local $nCount     $nCount = DllCall("shell32.dll", "int", 60, "hwnd", 0)         Return $nCount[0] EndFunc ConsoleWrite( "DllCall Error " & _WinAPI_GetLastError () & @CRLF & _WinAPI_GetLastErrorMessage ()) ;Error 13: The data is invalid.



Just something I had laying around.

Regards

ptrex

Edited by ptrex, 14 September 2012 - 09:47 AM.








#2 Emiel Wieldraaijer

Emiel Wieldraaijer

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 654 posts

Posted 16 March 2009 - 09:41 PM

Hi ptrex

Thanks for sharing

works indeed

don't know when i could could/should use it

Best regards,

Emiel
Best regards,Emiel WieldraaijerPosted Image

#3 TokGajah

TokGajah

    Seeker

  • Active Members
  • 7 posts

Posted 12 April 2009 - 12:07 AM

Hi, i found more simple way

WinClose("[CLASS:Progman]", "")

#4 ptrex

ptrex

    Universalist

  • MVPs
  • 2,400 posts

Posted 12 April 2009 - 08:38 PM

@TokGajah

Interesting !!

regards
ptrex

#5 zodiac

zodiac

    Seeker

  • Active Members
  • 16 posts

Posted 13 October 2009 - 10:51 AM

Doing a bit of grave digging here. :)

Is just tested these and they produce slightly different results. The computer I tried these on has a pending Windows Update. Using the function from ptrex displays the "Shut Down Windows" windows with the "Install updates and shut down" option pre-selectd, while the line from TokGajah doesn't even have that option.

#6 rajeshontheweb

rajeshontheweb

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 382 posts

Posted 26 October 2009 - 07:43 AM

Shutdowndialog


i did think i should get the winapi last error included. u have done that..




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users