Tool equivelent for rundll32.exe "user32.dll,LockWorkStation"

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Jun 4 08:18:00 GMT 2009


On Jun  3 16:39, Jason Pyeron wrote:
> Is there a tool like shutdown, etc to lock the workstation or should I stick
> with rundll32.exe "user32.dll,LockWorkStation"?

Stick with it.  A Cygwin tool could do nothing above that.  If you
really want a Cygwin tool, just write your own:

#include <stdio.h>
#define WINVER 0x0500
#include <windows.h>

int main ()
{
  if (!LockWorkStation ())
    {
      fprintf (stderr,
	       "%s: Can't lock workstation.  Win32 error code %lu\n",
      		GetLastError ());
      return 1;
    }
  return 0;
}


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list