home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / SHSUCD11.ZIP / REDIR.H < prev    next >
Text File  |  1994-03-01  |  4KB  |  99 lines

  1. /* begin redir.h  revised March 1, 1994 */
  2.  
  3. #define INT2F                   0x2f
  4.  
  5. #define INSTALLCHK              0x00
  6. #define DEINSTALL               0x04
  7.  
  8. /* Defines for redirector subfunctions */
  9. #define RMDIR           0x01
  10. #define MKDIR           0x03
  11. #define CHDIR           0x05
  12. #define CLOSE           0x06
  13. #define FLUSH           0x07
  14. #define READ            0x08
  15. #define WRITE           0x09
  16. #define LOCK            0x0a
  17. #define UNLOCK          0x0b
  18. #define GETSPACE        0x0c
  19. #define SETATTR         0x0e
  20. #define GETATTR         0x0f
  21. #define RENAME          0x11
  22. #define DELETE          0x13
  23. #define OPEN            0x16
  24. #define CREATE          0x17
  25. #define FINDFIRST       0x1B
  26. #define FINDNEXT        0x1C
  27. #define CLOSEALL        0x1d
  28. #define REDIRECT        0x1e
  29. #define PRINTSET        0x1f
  30. #define FLUSHALL        0x20
  31. #define SEEK            0x21
  32. #define PATHNAME        0x23
  33. #define PRINTREDIR      0x25
  34. #define EOPEN           0x2e
  35.  
  36. /* DOS return codes */
  37. #define FILENOTFOUND    0x02
  38. #define PATHNOTFOUND    0x03
  39. #define ACCESSDENIED    0x05
  40. #define INVALIDDRIVE    0x0f
  41. #define NOMOREFILES     0x12
  42. #define DRIVENOTREADY   0x15
  43. #define GENERALFAILURE  0x1f
  44.  
  45. #define PATHSEPARATOR   '\\'
  46.  
  47. /* DOS Search Data Block */
  48. struct SDB {
  49.         char          DriveLet;              /* Drive Letter              */
  50.         char          TemPlate[11];          /* Search template           */
  51.         BYTE          SAttr;                 /* Search attribute          */
  52.         WORD          Entry;                 /* Entry Count within dir    */
  53.         DWORD         ParentBlk;             /* Blk # of start of parent  */
  54.         WORD          ParentSize;            /* Size of parent, in bytes  */
  55. };
  56.  
  57. /* DOS Found Data Block */
  58. struct FDB {
  59.         char          FName[11];             /* Found Filename            */
  60.         BYTE          Fattr;                 /* Attr of found file        */
  61.         BYTE          Reserved[10];                                              WORD          FTime;
  62.         WORD          FDate;
  63.         WORD          Cluster;
  64.         long          FSize;
  65. };
  66.  
  67. /* System File Table (SFT) */
  68. struct SFT {
  69.         WORD          RefCnt;                /* Reference count            */
  70.         WORD          Mode;                  /* Open Mode                  */
  71.         char          DirAttrib;
  72.         WORD          Flags;
  73.         DWORD         CDSp;                  /* MSCDEX appears to use it
  74.                                                 for this purpose           */
  75.         WORD          Cluster;               /* Initial cluster not used?? */
  76.         WORD          HHMMSS;                /* Hour, Min, Sec/2           */
  77.         WORD          YYMMDD;                /* Year, Month, Day           */
  78.         DWORD         FilSiz;                /* file size/EOF location     */
  79.         DWORD         FilPos;                /* Current file position      */
  80.         DWORD         FBN;                   /* first block of file extent */
  81.         WORD          Owner;
  82.         BYTE          DontKnow1;             /*                            */
  83.         BYTE          Name[11];              /* file name                  */
  84.         BYTE          DontKnow2[16];         /* 4 bytes less before dos 4  */
  85. };
  86.  
  87. /* Directory entry for internal use */
  88. struct DirEnt {
  89.         BYTE          FName[11];             /* In DOS format             */
  90.         char          Fattr;                 /* Dos Attribute             */
  91.         WORD          FTime;                 /* In DOS format             */
  92.         WORD          FDate;                 /* In DOS format             */
  93.         DWORD         BlkNo;                 /* Starting block #          */
  94.         long          FSize;                 /* Size, in bytes            */
  95.         DWORD         ParentBlk;             /* Starting block #, parent  */
  96.         struct DirEnt *Forw;                 /* Next (queueing)           */
  97.         struct DirEnt *Back;                 /* Previous (queueing)       */
  98. };
  99. /* end redir.h   */