Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locked NT Workstation

Status
Not open for further replies.

xGrob

Programmer
Jun 6, 2001
36
CA
Is there a way for a program to determine if the NT/2000 workstation it is running on is locked or not? (i don't mean frozen, i mean the ctrl-alt-del then enter on "Lock Computer" method)
 
Locking through MS' MSDN site, I've run across WinLogon. It has three states, logged out, logged on, and locked. Just looking over this, it looks like it needs to be called via a DLL. James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
This one is the code under VisualC++.
#define _WIN32_WINNT 0x0500
#include<windows.h>
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
LockWorkStation();
return 0;
}
Under CBuilder should be the same, but the define may be not required or an other. Look near the declaration of this function(in winuser.h) and see some
#if _WIN32_WINNT > = 0x0500 //as in VisualC++
.....declarations
#endif
this _WIN32_WINNT could be other define John Fill
1c.bmp


ivfmd@mail.md
 
John,

[tab]Doesn't LockWorkstation lock the workstation? I thought xGrob wanted to know what the state was without locking the computer.

James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top