home *** CD-ROM | disk | FTP | other *** search
/ WindowsWare 2 the Maxx / winmaxx.zip / winmaxx / WIN_NT / PSXRPC.ZIP / PSXCLT.C < prev    next >
C/C++ Source or Header  |  1992-11-20  |  784b  |  43 lines

  1. /*
  2.  
  3.   POSIX Client Program
  4.  
  5.   (C) Copyright 1992 by
  6.  
  7.       John Richardson
  8.       CompuServe 70541,672
  9.       Internet jr@sni-usa.com
  10.  
  11.       This program may be used freely provided that this copyright is
  12.       included in the source listings.
  13.  
  14.  
  15.  
  16.   This demonstrates using the RPC facility to have the WIN32 server execute
  17.   requests on our behalf.
  18. */
  19. #include <unistd.h>
  20. #include <stdio.h>
  21. #include "win32psx.h"
  22.  
  23. extern int errno;
  24.  
  25.  
  26. main(int ac, char **av)
  27. {
  28.   /* Attach to the POSIX server that is our gateway to WIN32 */
  29.   AttachToServer();
  30.  
  31.   /* Send the Noop RPC to the WIN32 Server */
  32.   NoopRPC();
  33.  
  34.   /* Send a remote command execute request to WIN32 */
  35.   if(ac == 1)
  36.     SystemRPC("cl386");
  37.   else
  38.     SystemRPC(av[1]);
  39.  
  40.   return(0);
  41. }
  42.  
  43.