Hi Friends, I have written below code for checking whether windows machine is locked or not but its gives always window is locked though its not locked. Could anyone suggest what is wrong here or can give alternative solution? bool lockedHost = false; HMODULE hUser32; FARPROC LockWorkStation; hUser32 = GetModuleHandle("user32.dll"); if (hUser32) { LockWorkStation = GetProcAddress(hUser32, "LockWorkStation"); if (LockWorkStation) { lockedHost = true; MessageBox(0, "locked1", "Info", MB_OK); } } Thanks in advanced, Paresh
M
masaniparesh
@masaniparesh