Win32 - Lock your Workstation

Share your advanced PureBasic knowledge/code with the community.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Win32 - Lock your Workstation

Post by BackupUser »

Code updated For 5.20+

Restored from previous forum. Originally posted by MrVainSCL.

Thise tip show you, how to close Windows with a simple Win32 API call.
In order to unlock the PC you must enter the registration user name and password.

Code: Select all

    LockWorkStation_()


PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

plz note that you need an actual OS.
My WinNT SP 4 fails, coz it did not know this routine in user32.dll
:).
i think that win2000 and above is recommented.


Its a long way to the top if you wanna .....CodeGuru
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.

hi rings...
yes, possible this command require win2000 or above... I dont have any docs about this command on which system does it works... Btw on my Win2000 it works fine...

Declare Function LockWorkStation Lib "user32.dll" () As Long


PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

This is what the MS Platform SDK says:

Code: Select all

Requirements:
  Windows NT/2000/XP: Included in Windows 2000 and later.
  Windows 95/98/Me: Unsupported.
  Header: Declared in Winuser.h; include Windows.h.
  Library: Use User32.lib.


----------
Visit the PB Resources Site at http://www.reelmediaproductions.com/pb
Post Reply