home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / os2nloff.zip / NLOFF.C next >
C/C++ Source or Header  |  1988-07-04  |  870b  |  26 lines

  1. /*******************************************************************/
  2. /*    NLOFF.C - a short OS/2 utility to turn off the numlock      */
  3. /*          under OS/2.  Programmed by Charles Petzold         */
  4. /*          of PC Magazine, and presented on PCMagNet.        */
  5. /*          As Charles says in his message, a better         */
  6. /*          approach than creating a device driver to         */
  7. /*          do such a simle job.  - JPS                */
  8. /*******************************************************************/
  9.  
  10. #define INCL_BASE    /* added by JPS to conform with different   */
  11.             /* OS2.H file                    */
  12. #define INCL_KBD
  13. #include <os2.h>
  14. #include <process.h>
  15.  
  16. int main (int argc, char *argv[])
  17.           {
  18.           static KBDINFO kbst = { 10, 0x10, 0, 0, 0 } ;
  19.  
  20.           KbdSetStatus (&kbst, 0) ;
  21.           spawnv (P_NOWAIT, argv[1], argv + 1) ;
  22.           return 0 ;
  23.           }
  24.  
  25.  
  26.