home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / DSKCPY2A.ZIP / READ.ME < prev   
Text File  |  1989-08-24  |  4KB  |  76 lines

  1. To whom it may concern:
  2.  
  3.   Enclosed in the dskcpy2.arc archive will be:
  4.      read.me        --   this file
  5.      dskcpy2.exe    --   protected mode executable
  6.      dskcpy2.c      --   source code for the above
  7.  
  8.   Dskcpy2 attempts to be a "smarter" diskcopy in that it will read the
  9. entire source disk into memory on one pass and then retains it for
  10. as many copies as the user cares to make.
  11.   The earlier version of dskcpy2 had a problem copying to an unformatted
  12. diskette that has now been solved with the assistance of GEnie subscriber
  13. Ron Kracht.  The previous restriction of "preformatted disks only" is
  14. no longer in effect.
  15.   Dskcpy2 is hereby released into the public domain.  It is not guaranteed
  16. to be free from error and I assume no responsibility for anything you do
  17. to it, with it, or anything it might do to you.
  18.  
  19.   Using Dskcpy2:
  20.   Command line syntax is: "dskcpy2 [drive]" where "drive" is an optional
  21. parameter specifying the removable disk drive upon which dskcpy2 will
  22. perform it's task.  If "drive" is not specified, dskcpy2 assumes "a:".
  23.   On the first menu you see you have the choice of reading a diskette into
  24. memory or exiting dskcpy2.  Once a disk has been read, another option
  25. allowing you to copy that memory image to another diskette will become
  26. available.  You may copy the original source diskette to as may target
  27. diskettes as you wish.
  28.  
  29.   If you have any questions or comments please feel free to drop me mail
  30. at my GEnie address of B.FLOWERS.
  31.  
  32. ---------------------------------------------------------------------------
  33.  
  34. Short technical discussion:
  35.  
  36.   First, it's worth noting that there are a couple of OS/2 bugs that
  37. had to be worked around.  One is in the header file "bsedev.h" in the
  38. typedef for the BIOSPARAMETERBLOCK structure; it's missing a field.
  39. The BSPBLK structure defined in dskcpy2.c compensates for this and
  40. is used instead.  The other problem happens when DosDevIOCtl is called
  41. with the DSK_GETDEVICEPARAMS parameter with a 360k floppy in a high
  42. density drive.  All the information contained in the BIOSPARAMETERBLOCK
  43. (BSPBLK) is correct EXCEPT for the cCylinders field which comes back
  44. 80. This is why I don't use that value in any computations throughout
  45. dskcpy2 but instead calculate it from the other fields.
  46.   If you have a copy of the earlier version, distributed in the file
  47. DSKCPY2.ARC, and have looked through the source code and, like me, were
  48. unable to discover why the DosDevIOCtl call with the DSK_FORMATVERIFY
  49. parameter would reliably fail with error code ERROR_BAD_COMMAND,
  50. you will be interested to find out that the Microsoft documentation
  51. concerning this use of DosDevIOCtl is wrong...  In QuickHelp, at least,
  52. the first parameter to DosDevIOCtl for this function should be 0L. Not
  53. so, it needs to be a far pointer to a long which has been initialized
  54. to zero!  Once again, I have Ron Kracht to thank for pointing this out
  55. to me.  He inferred this information from the Norton Guides for OS/2
  56. discussion of the function.
  57.  
  58. So, what was in the old code:
  59.      DosDevIOCtl(0L, trkfmt, DSK_FORMATVERIFY, IOCTL_DISK, hf);
  60. becomes:
  61.      ULONG _fmtData = 0L;
  62.      DosDevIOCtl(&_fmtData, trkfmt, DSK_FORMATVERIFY, IOCTL_DISK, hf);
  63.  
  64. That's it.  the function now happily does what you ask it to.
  65.  
  66. Compilation notes:
  67.   The compiler command I've been using is:
  68.      cl -AL -Zep -G2 -W3 -Lp dskcpy2.c
  69.  
  70.   Thanks again if you were one of the ones who examined the code in
  71. hopes of locating this problem.
  72.  
  73.   Brady Flowers
  74.   8-24-89
  75.  
  76.