Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / November 2004



Tip: Looking for answers? Try searching our database.

Can you make a link to locking the workstation?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James - 26 Nov 2004 09:07 GMT
Can you make a link in an application to lock the workstation the user
is using, with windows XP specifically, and maybe also windows 95.
Thank you.
Randy Birch - 27 Nov 2004 00:47 GMT
The concept of "locking a workstation" does not exist in any Windows version
prior to NT. So for 9x you're toast.  For NT-based systems, call the
LockWorkstation API.

Note, for the record, that this function is callable only by processes
running on the interactive desktop. In addition, a user must be logged on,
and the workstation cannot already be locked.

Private Declare Sub LockWorkStation Lib "user32.dll" ()

'calling syntax:

  LockWorkStation

Signature

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

: Can you make a link in an application to lock the workstation the user
: is using, with windows XP specifically, and maybe also windows 95.
: Thank you.
James - 29 Nov 2004 13:50 GMT
Is it possible to put this as a click function into a list box?
Randy Birch - 29 Nov 2004 23:22 GMT
Sure, why not?

Signature

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

: Is it possible to put this as a click function into a list box?
James - 29 Nov 2004 13:42 GMT
What do you mean by only callable in an interactive desktop?
Randy Birch - 29 Nov 2004 23:22 GMT
A service can't call lockworkstation - only an application that is running
on a desktop under a logged-on user can call it.

Signature

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

: What do you mean by only callable in an interactive desktop?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.