Xref: news2.mv.net comp.os.msdos.djgpp:2924 From: u7711501 AT bicmos DOT ee DOT nctu DOT edu DOT tw (Jih-Shin Ho) Newsgroups: comp.os.msdos.djgpp Subject: Re: Detecting drives Date: 22 Apr 1996 04:22:11 GMT Organization: Computer Center, National Chiao-Tung University, Taiwan Lines: 34 Message-ID: <4lf1hj$mhm@ccnews.nctu.edu.tw> References: NNTP-Posting-Host: bicmos.ee.nctu.edu.tw NNTP-Posting-User: u7711501 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote: : : On 15 Apr 1996, Jih-Shin Ho wrote: : : > The above code can detect all drives that DOS understands. For example, : > network drive. : : Not so fast. "Network drives" might mean Novell 3.x, and you'd be : surprised to see what you can get there, since Novell 3.x hooks Int 21h : before DOS and thus any info about Novell drives bypasses DOS entirely. If DOS doesn't understand this drive, how can it use the drive ? For example, 'dir x:' : : > 0x4409 DOS function call doesn't touch disk drive. It uses (I am not sure) the : > internal data structure in DOS kernel for the detection. : : This might be a source of another problem, this time with CD-ROMs. You : could get successfull return from 4409 with stale data even if there is no : disk in the drive. That's because no DOS filesystem exists on the CD, : it's an illusion created entirely by MSCDEX. Try putting a disk into a CD : drive, make some DOS call, then remove the disk, close the door and issue : 4409. I've seen similar functions returning ``valid'' data about a disk : that's long ago gone in such cases (but I didn't try this with 4409, so I : can't say for sure). But the title is 'detecting drive', not 'detecting valid disk in drive'. 4409 only tells you which drive is valid, it can't tell if there is a disk in drive. -- Jih-Shin Ho, National Chiao Tung University u7711501 AT bicmos DOT ee DOT nctu DOT edu DOT tw