I have an application in which I need to end a screensaver before it's invoked.
Will TerminateProcess or KillProcess work?

Hope everyone has a great 4th.

Thanks.
Posted on 2007-06-30 13:48:47 by skywalker

BOOL CALLBACK KillScreenSaverFunc (HWND hwnd, LPARAM lParam)
{
  char szClass [32];
  GetClassName (hwnd, szClass, sizeof(szClass)-1);
  if (strcmpi (szClass, "WindowsScreenSaverClass") == 0)
      PostMessage (hwnd, WM_CLOSE, 0, 0);
  return TRUE;
}


From:
Bob Moore's Coding Tips
Posted on 2007-07-01 13:59:14 by JimmyClif
Thanks JimmyClif.

Andy
Posted on 2007-07-01 14:46:58 by skywalker
You're welcome... and you too a happy 4th.

And.. for the Canadians in here... Happy 1st :)
Posted on 2007-07-01 18:07:51 by JimmyClif