I want to create a program that "locks" my work station as soon as I leave or move away from my computer. And automatically starts again as soon as the user login.
I'm using Opencv to track my movement and its working.
now I want to know how can I automatically start a function again as soon as the user login using c++
I'm using
LockWorkStation();
to lock my system
I have a C# implementation for it which I got from
Programmatically Determine a Duration of a Locked Workstation?
const int SessionUnlockParam = 0x8;
if (m.WParam.ToInt32() == SessionUnlockParam)
{OnSessionUnlock(); // Do something when unlocked
}
void OnSessionUnlock()
{
// Do something......
}
can someone tell me how to to do this in C++ and which libraries to use
or
How can I access Event IDs in C++ such as: " Event_ID = 4801 - The workstation was unlocked".
for windows 8