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
[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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.