hi,
i have a problem with stopping windows to shutdown , i founded some code
but this code doesnt work ,,, windows is still shuting down ( logging off or restart )!
Any ideas?
tx...
i have a problem with stopping windows to shutdown , i founded some code
C#:
private int WM_QUERYENDSESSION = 0x11;
private int WM_CANCELMODE = 0x1F;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_QUERYENDSESSION)
{
Message x = new Message();
x.Msg = WM_CANCELMODE;
base.WndProc(x);
}
else
{
base.WndProc(m);
}
}
but this code doesnt work ,,, windows is still shuting down ( logging off or restart )!
Any ideas?
tx...