home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / PMF202.ZIP / DSKIM.H < prev    next >
Text File  |  1990-05-30  |  1KB  |  38 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    80
  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. // Note, for the lockdrive/unlockdrive macros, the global variable _lockCmd
  18. // must be accessable and set to zero!
  19.  
  20. #define lockdrive(hf)   (tcThBufs[curTh].ErrorCode = DosDevIOCtl(0L, &_lockCmd, DSK_LOCKDRIVE,   IOCTL_DISK, hf))
  21. #define unlockdrive(hf) (tcThBufs[curTh].ErrorCode = DosDevIOCtl(0L, &_lockCmd, DSK_UNLOCKDRIVE, IOCTL_DISK, hf))
  22.  
  23. typedef struct _DskImage {
  24.   USHORT       Percent;      // percent completion
  25.   BOOL         Busy;         // Busy flag
  26.   CHAR         DriveID[1];   // Drive letter
  27.   USHORT       FormatOptions;// Bit map indicating formatting choice
  28.   CHAR         Volume[VOLUMENMSZ];    // Volume Name
  29.   CHAR         BufferName[BUFFERNMSZ];// Image Buffer Name
  30.   CHAR         FileName[FILENMSZ];    // Image file Name
  31.  
  32.   BSPBLK       DskParms;     // from sourceParms
  33.   SEL          DskSel;       // selector for huge pointer to track buffer
  34.   USHORT       SelOff;       // huge selector offset
  35.   PTRACKLAYOUT DskLayout;    // from sourceLayout
  36.   USHORT       usLayoutSize; // from sizeofLayoutElement
  37. } DskImage;
  38.