home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / isremote.c < prev    next >
C/C++ Source or Header  |  1993-10-14  |  2KB  |  72 lines

  1. /*
  2.  * File......: ISREMOTE.C
  3.  * Author....: Dave Pearson
  4.  * BBS.......: The Dark Knight Returns
  5.  * Net/Node..: 050/069
  6.  * User Name.: Dave Pearson
  7.  * Date......: $Date$
  8.  * Revision..: $Revision$
  9.  * Log file..: $Logfile$
  10.  *
  11.  * This is an original work by Dave Pearson and is placed in the public
  12.  * domain.
  13.  *
  14.  * Modification history:
  15.  * ---------------------
  16.  *
  17.  * $Log$
  18.  *
  19.  */
  20.  
  21. // NOTE: This code has been written for and compiled with Borland C++
  22. //       Version 3.1
  23. //
  24.  
  25. #include <extend.h>
  26. #include "internal.h"
  27.  
  28. /*  $DOC$
  29.  *  $FUNCNAME$
  30.  *      GT_REMOTE()
  31.  *  $CATEGORY$
  32.  *      Environment
  33.  *  $ONELINER$
  34.  *      Check if a drive as a remote drive.
  35.  *  $SYNTAX$
  36.  *      GT_Remote([<ncDrive>]) --> lIsRemote
  37.  *  $ARGUMENTS$
  38.  *      <ncDrive> is an optional parameter that is the id of the drive
  39.  *      to be checked. This paramater can be either a character value who's
  40.  *      first character is taken as the drive letter or a numeric value
  41.  *      where 0 = Default, 1 = A:, 2 = B:, etc... If no parameter is
  42.  *      passed the default drive is used.
  43.  *  $RETURNS$
  44.  *      A logical value, true (.T.) if the drive is a remote drive, false
  45.  *      (.F.) if it is local.
  46.  *  $DESCRIPTION$
  47.  *      GT_Remote() can be used to check if a drive is a remote device.
  48.  *  $EXAMPLES$
  49.  *      // Each of the following check if drive D: is a remote drive.
  50.  *
  51.  *      ? GT_Remote("D:")
  52.  *      ? GT_Remote("D")
  53.  *      ? GT_Remote("Dark Knight")     // First letter is used only.
  54.  *      ? GT_Remote(4)
  55.  *
  56.  *      // The next two check the current drive.
  57.  *
  58.  *      ? GT_Remote(0)
  59.  *      ? GT_Remote()
  60.  *  $END$
  61.  */
  62.  
  63. CLIPPER GT_Remote()
  64. {
  65.         char Drive = _GT_Internal_GetDriveName(1);
  66.  
  67.         asm     Mov     AX,0x4409
  68.         asm     Mov     BL,Drive
  69.         asm     Int     0x21
  70.         _retl((_DX & 0x800) == 0);
  71. }
  72.