Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!pt.cs.cmu.edu!b.gp.cs.cmu.edu!Ralf.Brown@B.GP.CS.CMU.EDU From: Ralf.Brown@B.GP.CS.CMU.EDU Newsgroups: comp.os.msdos.misc Subject: Re: Hiding a DOS drive Message-ID: <26ee2617@ralf> Date: 12 Sep 90 12:12:07 GMT Sender: ralf@b.gp.cs.cmu.edu Organization: Carnegie Mellon University School of Computer Science Lines: 44 In-Reply-To: <9461@ur-cc.UUCP> In article <9461@ur-cc.UUCP>, dsew@uhura.cc.rochester.edu (David Sewell) wrote: } } I'm about to start sharing my office computer with another user. }I have a hard disk with two partitions, C: and D:. I would like to }make the D: drive invisible or inaccessible to the sharee because it }contains personal data and files. Since the sharee is not a The fastest way of temporarily making a drive inaccessible under DOS 3+ would be to diddle the "drive exists" bit in the current directory structure for the drive. It's anything other than elegant, though, since it involves various undocumented data structures inside DOS. INT 21 - DOS 2+ internal - GET LIST OF LISTS AH = 52h Return: ES:BX -> DOS list of lists Format of List of Lists: Offset Size Description ---DOS 3.0--- 17h DWORD pointer to array of current directory structures (see below) ---DOS 3.1-3.3--- 16h DWORD pointer to array of current directory structures (see below) ---DOS 4.x--- 16h DWORD pointer to array of current directory structures (see below) Format of current directory structure (array, 51h bytes [58h for DOS 4.x] per drive): Offset Size Description 00h 67 BYTEs current path as ASCIZ, starting with 'x:\' 43h WORD bit flags bit 15: network drive \ installable file system if both set bit 14: physical drive / invalid drive if neither bit set bit 13: JOIN'ed, current path is actual path without JOIN drive letter in path may differ from logical drive name bit 12: SUBST'ed, current path is actual path without SUBST drive letter in path may differ from logical drive name [rest omitted, see the Interrupt List] -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=- 412-268-3053 (school) -=- FAX: ask ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: 1:129/3.1 Disclaimer? | I was gratified to be able to answer promptly, and I did. What's that? | I said I didn't know. --Mark Twain