home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l440 / 2.ddi / CHAP4 / CURRDIR.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-09-25  |  1.0 KB  |  35 lines

  1. /* CURRDIR.H */
  2.  
  3. #define NETWORK     (1 << 15)
  4. #define PHYSICAL    (1 << 14)
  5. #define JOIN        (1 << 13)
  6. #define SUBST       (1 << 12)
  7.  
  8. typedef unsigned char BYTE;
  9. typedef unsigned WORD;
  10. typedef unsigned long DWORD;
  11. typedef BYTE far *DPB;      // provide actual DPB struct if needed
  12.  
  13. #pragma pack(1)
  14.  
  15. typedef struct {
  16.     BYTE current_path[67];  // current path
  17.     WORD flags;             // NETWORK, PHYSICAL, JOIN, SUBST
  18.     DPB  far *dpb;          // pointer to Drive Parameter Block
  19.     union {
  20.         struct {
  21.             WORD start_cluster; // root: 0000; never accessed: FFFFh
  22.             DWORD unknown;
  23.             } LOCAL;        // if (! (cds[drive].flags & NETWORK))
  24.         struct {
  25.             DWORD redirifs_record_ptr;
  26.             WORD parameter;
  27.             } NET;          // if (cds[drive].flags & NETWORK)
  28.         } u;
  29.     WORD backslash_offset;  // offset in current_path of '\'
  30.     // DOS4 fields for IFS
  31.     // 7 extra bytes...
  32.     } CDS;
  33.  
  34. CDS far *currdir(unsigned drive);
  35.