🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12790

Re: virtual drive

#12790
From: Remy Lebeau (TeamB)
Date: Mon, 17 Nov 2003 23:55
27 lines
1845 bytes
"Erwin Samayoa" <saenito@bigfoot.com> wrote in message
news:3fb95225@newsgroups.borland.com...
> how can i create a virtual drive like a virtual hard disk
> mapped to a drive letter ej f:\

The easiest way is to just spawn an instance of the SUBST command-line
program, which comes with Windows for assigning drive letters to physical
folders on the hard drive.

If you want to handle the creation yourself, then:

Under Win9x/Me you have to call DeviceIoControl() to trigger Int21h function
71AAh via the VWIN32.VXD device driver:

    Calling DeviceIoControl on Windows Me/98/95

http://msdn.microsoft.com/library/en-us/devio/base/calling_deviceiocontrol_on_windows_95_98_me.asp

Under WinNT/2K/XP, on the other hand, you can use the DefineDosDevice()
function to create the mapping directly:

    DefineDosDevice
    http://msdn.microsoft.com/library/en-us/fileio/base/definedosdevice.asp


Gambit
Technical Details
Message-ID: <3fb95f05$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fb95225@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,f284f7348da7e388
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-17 16:09:54 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fb95225@newsgroups.borland.com>
Subject: Re: virtual drive
Date: Mon, 17 Nov 2003 15:55:17 -0800
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.137.149
Message-ID: <3fb95f05$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1069113093 67.22.137.149 (17 Nov 2003 15:51:33 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail