home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / os2 / gbdrv / csource / gbootdrv / gbootdrv.doc < prev    next >
Encoding:
Text File  |  1993-03-15  |  1.1 KB  |  31 lines

  1.    GetBootDrive - REXX
  2.    Copyright (C) 1993 Bruce E. Högman.  All Rights Reserved.
  3.    This program is dedicated to the Public Domain by the author.
  4.  
  5.    Function:  GetBootDrive returns the letter of the drive used to
  6.    boot the system.  It uses DosQuerySysInfo to return the boot drive
  7.    number from OS/2.
  8.  
  9.    The source file, GBOOTDRV.C, illustrates the use of the
  10.    DosQuerySysInfo control program API function to return information
  11.    from the operating system.  The boot drive information is most needed
  12.    to design fool-proof install REXX programs.  GBOOTDRV is a simple
  13.    REXX external function to provide this information for REXX programs.
  14.    Use the source program as a template to design your own REXX external
  15.    functions.
  16.  
  17.    Sample REXX to show the boot drive:
  18.  
  19. /* REXX */
  20. if 0 < RxFuncQuery('SysLoadFuncs') THEN DO;
  21.    Call rxfuncadd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs';
  22.    Call SysLoadFuncs;
  23. END;
  24. Call rxfuncadd 'GetBootDrive','GBOOTDRV','GetBootDrive';
  25. BootDrive=GetBootDrive();
  26. say 'Boot Drive='BootDrive;
  27. Call RxFuncDrop 'GetBootDrive';
  28. exit;
  29.  
  30.  
  31.