home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / pmflp301.zip / diskcopy / dskim.h < prev    next >
Text File  |  1995-05-17  |  2KB  |  41 lines

  1. /* DskImage 1.0, Copyright 1990, Greg Bryant*/
  2. /**/
  3.  
  4. #define BSPBLK BIOSPARAMETERBLOCK
  5.  
  6. #define BUFFERNMSZ  8
  7. #define VOLUMENMSZ  11
  8. #define FILENMSZ    256
  9.  
  10. #define BUSY        0xFFFF
  11. #define BUSY_READ   0x0001
  12. #define BUSY_WRITE  0x0002
  13. #define BUSY_SAVE   0x0004
  14. #define BUSY_LOAD   0x0008
  15. #define BUSY_COMP   0x0010
  16.  
  17. static ULONG        dummyParamInOut,
  18.                     dummyDataInOut;
  19. /* Note, for the lockdrive/unlockdrive macros, the global variable _lockCmd*/
  20. /* must be accessable and set to zero!*/
  21.  
  22. #define lockdrive(hf)   (tcThBufs[curTh].ErrorCode = DosDevIOCtl(hf, IOCTL_DISK, DSK_LOCKDRIVE, NULL, 0, NULL, NULL, 0, NULL))
  23. #define unlockdrive(hf) (tcThBufs[curTh].ErrorCode = DosDevIOCtl(hf, IOCTL_DISK, DSK_UNLOCKDRIVE, NULL, 0, &dummyParamInOut, NULL, 0, &dummyDataInOut))
  24.  
  25. typedef struct _DskImage {
  26.   USHORT       Percent;      /* percent completion*/
  27.   BOOL         Busy;         /* Busy flag*/
  28.   CHAR         DriveID[1];   /* Drive letter*/
  29.   USHORT       FormatOptions;/* Bit map indicating formatting choice*/
  30.   CHAR         Volume[VOLUMENMSZ];    /* Volume Name*/
  31.   CHAR         BufferName[BUFFERNMSZ];/* Image Buffer Name*/
  32.   CHAR         FileName[FILENMSZ];    /* Image file Name*/
  33.   BIOSPARAMETERBLOCK  DskParms;     /* from sourceParms*/
  34.   SEL          DskSel;       /* selector for huge pointer to track buffer*/
  35.   USHORT       SelOff;       /* huge selector offset*/
  36.   PTRACKLAYOUT DskLayout;    /* from sourceLayout*/
  37.   USHORT       usLayoutSize; /* from sizeofLayoutElement*/
  38.     char    volumeLabel[12];
  39.   PVOID            diskBuffer;    /* put the diskette data here */
  40. } DskImage;
  41.