home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7540 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.4 KB  |  38 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!uunet.ca!canrem!dosgate!dosgate![paul.fry@canrem.com]
  3. From: "paul fry" <paul.fry@canrem.com>
  4. Subject: programming help
  5. Message-ID: <1993Jan12.4882.7752@dosgate>
  6. Reply-To: "paul fry" <paul.fry@canrem.com>
  7. Organization: Canada Remote Systems
  8. Distribution: comp
  9. Date: 12 Jan 93 22:01:36 EST
  10. Lines: 26
  11.  
  12. Can someone assist a novice C/C++ programmer !!!
  13.  
  14. I've written code (using Borland's C/C++) to detect a disk error
  15. on a floppy drive - in particular, NO DISK PRESENT. I'm using:
  16.  
  17.     k=bisodisk(0,which-65,0,1,1,1,buffer);
  18.  
  19. where 'which' equals the 'A' or 'B' drive. This biosdisk call (according
  20. to the C/C++ manual) tries to read a track and sector into 'buffer'.
  21.  
  22. Under DOS 3.xx and up, it (very nicely) returns an error code to the
  23. calling program when no disk is present, thus allowing the application
  24. to handle the error and avoid the standard Abort/Retry/Fail.
  25.  
  26. Under OS2, an error is returned EVERY time, even when a disk IS present.
  27.  
  28. I'd appreciate any insight/assistance someone might offer. Try not
  29. to laugh at the technique I've used, above. IT DOES WORK! I'm not
  30. writing an OS2 application. I'd really be ecstatic if you could relate
  31. a routine that was both DOS and OS2 compatible.
  32.          ----
  33.  
  34. Thanks for your time.
  35. --
  36. Canada Remote Systems  - Toronto, Ontario
  37. World's Largest PCBOARD System - 416-629-7000/629-7044
  38.