home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 32 Periodic / 32-Periodic.zip / edmi1-7.zip / IFS3.ZIP / r0r3shar.h
C/C++ Source or Header  |  1993-12-07  |  7KB  |  266 lines

  1. /******************************************************************************
  2. *******************************************************************************
  3. **
  4. ** EXR0R3 - A ring 0/ring 3 IFS skeleton
  5. ** Copyright (C) 1993 by Andre Asselin
  6. **
  7. ** R0R3SHAR.H - Shared structures between the ring 0 and ring 3 piece
  8. **
  9. ** History:
  10. ** 6/22/93 - created
  11. **
  12. *******************************************************************************
  13. ******************************************************************************/
  14.  
  15. enum { FSCTL_FUNC_INIT = 0x9000, FSCTL_FUNC_NEXT, FSCTL_FUNC_KILL };
  16.  
  17. #if defined (__OS2__)
  18. typedef void *LINADDR;
  19. #endif
  20.  
  21. typedef struct InitStruc {
  22.    LINADDR OpData;
  23.    LINADDR Buf;
  24. } INITSTRUC;
  25.  
  26. // Make enumerations take a byte or word if possible
  27. #pragma option -b- -a-
  28.  
  29. typedef enum CPFUNCCODES {
  30.    CPFC_ATTACH = 0x8000, 
  31.    CPFC_CANCELLOCKREQUEST,
  32.    CPFC_CHDIR,
  33.    CPFC_CHGFILEPTR,
  34.    CPFC_CLOSE,
  35.    CPFC_COMMIT,
  36.    CPFC_COPY,
  37.    CPFC_DELETE,
  38.    CPFC_FILEATTRIBUTE,
  39.    CPFC_FILEINFO,
  40.    CPFC_FILELOCKS,
  41.    CPFC_FINDCLOSE,
  42.    CPFC_FINDFIRST,
  43.    CPFC_FINDFROMNAME,
  44.    CPFC_FINDNEXT,
  45.    CPFC_FLUSHBUF,
  46.    CPFC_FSINFO,
  47.    CPFC_MKDIR,
  48.    CPFC_MOVE,
  49.    CPFC_NEWSIZE,
  50.    CPFC_OPENCREATE,
  51.    CPFC_PATHINFO,
  52.    CPFC_PROCESSNAME,
  53.    CPFC_READ,
  54.    CPFC_RMDIR,
  55.    CPFC_VERIFYUNCNAME,
  56.    CPFC_WRITE
  57. } CPFUNCCODES;
  58.  
  59. typedef struct OpData {
  60.    union {
  61.       CPFUNCCODES funccode;
  62.       unsigned short rc;
  63.    };
  64.    union {
  65.       struct {
  66.          unsigned short flag;
  67.          struct vpfsd vpfsd;
  68.          struct cdfsd cdfsd;
  69.          unsigned short Len;
  70.          char Dev[CCHMAXPATH];
  71.       } attach;
  72.       struct {
  73.          struct sffsi sffsi;
  74.          struct sffsd sffsd;
  75.          struct filelock LockRange;
  76.       } cancellockrequest;
  77.       struct {
  78.          unsigned short flag;
  79.          struct cdfsi cdfsi;
  80.          struct cdfsd cdfsd;
  81.          unsigned short iCurDirEnd;
  82.          char Dir[CCHMAXPATH];
  83.       } chdir;
  84.       struct {
  85.          struct sffsi sffsi;
  86.          struct sffsd sffsd;
  87.          long offset;
  88.          unsigned short type;
  89.          unsigned short IOflag;
  90.       } chgfileptr;
  91.       struct {
  92.          unsigned short type;
  93.          unsigned short IOflag;
  94.          struct sffsi sffsi;
  95.          struct sffsd sffsd;
  96.       } close;
  97.       struct {
  98.          unsigned short type;
  99.          unsigned short IOflag;
  100.          struct sffsi sffsi;
  101.          struct sffsd sffsd;
  102.       } commit;
  103.       struct {
  104.          unsigned short flag;
  105.          struct cdfsi cdfsi;
  106.          struct cdfsd cdfsd;
  107.          unsigned short iSrcCurDirEnd;
  108.          unsigned short iDstCurDirEnd;
  109.          unsigned short nameType;
  110.          char Src[CCHMAXPATH];
  111.          char Dst[CCHMAXPATH];
  112.       } copy;
  113.       struct {
  114.          struct cdfsi cdfsi;
  115.          struct cdfsd cdfsd;
  116.          unsigned short iCurDirEnd;
  117.          char File[CCHMAXPATH];
  118.       } fsdelete;
  119.       struct {
  120.          unsigned short flag;
  121.          struct cdfsi cdfsi;
  122.          struct cdfsd cdfsd;
  123.          unsigned short iCurDirEnd;
  124.          unsigned short Attr;
  125.          char Name[CCHMAXPATH];
  126.       } fileattribute;
  127.       struct {
  128.          unsigned short flag;
  129.          struct sffsi sffsi;
  130.          struct sffsd sffsd;
  131.          unsigned short level;
  132.          unsigned short cbData;
  133.          unsigned short IOflag;
  134.          unsigned long oError;
  135.       } fileinfo;
  136.       struct {
  137.          struct sffsi sffsi;
  138.          struct sffsd sffsd;
  139.          struct filelock UnLockRange;
  140.          struct filelock LockRange;
  141.          unsigned long timeout;
  142.          unsigned long flags;
  143.       } filelocks;
  144.       struct {
  145.          struct fsfsi fsfsi;
  146.          struct fsfsd fsfsd;
  147.       } findclose;
  148.       struct {
  149.          struct cdfsi cdfsi;
  150.          struct cdfsd cdfsd;
  151.          unsigned short iCurDirEnd;
  152.          unsigned short attr;
  153.          struct fsfsi fsfsi;
  154.          struct fsfsd fsfsd;
  155.          unsigned short cbData;
  156.          unsigned short cMatch;
  157.          unsigned short level;
  158.          unsigned short flags;
  159.          unsigned long oError;
  160.          char Name[CCHMAXPATH];
  161.       } findfirst;
  162.       struct {
  163.          struct fsfsi fsfsi;
  164.          struct fsfsd fsfsd;
  165.          unsigned short cbData;
  166.          unsigned short cMatch;
  167.          unsigned short level;
  168.          unsigned short position;
  169.          unsigned short flags;
  170.          unsigned long oError;
  171.          char Name[CCHMAXPATH];
  172.       } findfromname;
  173.       struct {
  174.          struct fsfsi fsfsi;
  175.          struct fsfsd fsfsd;
  176.          unsigned short cbData;
  177.          unsigned short cMatch;
  178.          unsigned short level;
  179.          unsigned short flags;
  180.          unsigned long oError;
  181.       } findnext;
  182.       struct {
  183.          struct vpfsd vpfsd;
  184.          unsigned short flag;
  185.       } flushbuf;
  186.       struct {
  187.          unsigned short flag;
  188.          struct vpfsd vpfsd;
  189.          unsigned short cbData;
  190.          unsigned short level;
  191.       } fsinfo;
  192.       struct {
  193.          struct cdfsi cdfsi;
  194.          struct cdfsd cdfsd;
  195.          unsigned short iCurDirEnd;
  196.          unsigned short flags;
  197.          unsigned long oError;
  198.          char Name[CCHMAXPATH];
  199.       } mkdir;
  200.       struct {
  201.          struct cdfsi cdfsi;
  202.          struct cdfsd cdfsd;
  203.          unsigned short iSrcCurDirEnd;
  204.          unsigned short iDstCurDirEnd;
  205.          unsigned short flags;
  206.          char Src[CCHMAXPATH];
  207.          char Dst[CCHMAXPATH];
  208.       } move;
  209.       struct {
  210.          struct sffsi sffsi;
  211.          struct sffsd sffsd;
  212.          unsigned long len;
  213.          unsigned short IOflag;
  214.       } newsize;
  215.       struct {
  216.          struct cdfsi cdfsi;
  217.          struct cdfsd cdfsd;
  218.          unsigned short iCurDirEnd;
  219.          struct sffsi sffsi;
  220.          struct sffsd sffsd;
  221.          unsigned long ulOpenMode;
  222.          unsigned short usOpenFlag;
  223.          unsigned short usAction;
  224.          unsigned short usAttr;
  225.          unsigned short fgenflag;
  226.          unsigned long oError;
  227.          char Name[CCHMAXPATH];
  228.       } opencreate;
  229.       struct {
  230.          unsigned short flag;
  231.          struct cdfsi cdfsi;
  232.          struct cdfsd cdfsd;
  233.          unsigned short iCurDirEnd;
  234.          unsigned short level;
  235.          unsigned short cbData;
  236.          unsigned long oError;
  237.          char Name[CCHMAXPATH];
  238.       } pathinfo;
  239.       struct {
  240.          char NameBuf[CCHMAXPATH];
  241.       } processname;
  242.       struct {
  243.          struct sffsi sffsi;
  244.          struct sffsd sffsd;
  245.          unsigned short Len;
  246.          unsigned short IOflag;
  247.       } read;
  248.       struct {
  249.          struct cdfsi cdfsi;
  250.          struct cdfsd cdfsd;
  251.          unsigned short iCurDirEnd;
  252.          char Name[CCHMAXPATH];
  253.       } rmdir;
  254.       struct {
  255.          unsigned short flag;
  256.          char Name[CCHMAXPATH];
  257.       } verifyuncname;
  258.       struct {
  259.          struct sffsi sffsi;
  260.          struct sffsd sffsd;
  261.          unsigned short Len;
  262.          unsigned short IOflag;
  263.       } write;
  264.    };
  265. } OPDATA;
  266.