Article View: borland.public.cppbuilder.nativeapi
Article #16761Re: CMD or !CMD
From: Remy Lebeau (TeamB)
Date: Mon, 28 Apr 2003 05:18
Date: Mon, 28 Apr 2003 05:18
39 lines
2220 bytes
2220 bytes
<DeKayA@bellsouth.net> wrote in message
news:3eacad34.22425665@forums.inprise.com...
> I am using DOS (cmd) to accomplish a
> environmental setting is this the best way to
> effect the system settings
It would be best to not call SUBST at all, but instead create the drive
substitution yourself.
Under NT/2K/XP, you can use DefineDosDevice(), which does the same thing
SUBST does:
DefineDosDevice()
http://msdn.microsoft.com/library/en-us/fileio/base/definedosdevice.asp
Under Win9x/Me, DefineDosDevice() is not available, so you have to instead
use DeviceIoControl() with the VMM32 device driver to indirectly call
Interrupt 21h Function 71AAh:
DeviceIoControl
http://msdn.microsoft.com/library/en-us/devio/base/deviceiocontrol.asp
Calling DeviceIoControl on Windows Me/98/95
http://msdn.microsoft.com/library/en-us/devio/base/calling_deviceiocontrol_on_windows_95_98_me.asp
Interrupt 21h Function 71AAh Minor Code 0h
http://msdn.microsoft.com/library/en-us/win9x/95func_8pk8.asp
Interrupt 21h Function 71AAh Minor Code 1h
http://msdn.microsoft.com/library/en-us/win9x/95func_8pm0.asp
Interrupt 21h Function 71AAh Minor Code 2h
http://msdn.microsoft.com/library/en-us/win9x/95func_8pns.asp
Gambit
Technical Details
Message-ID:
<3eacb96c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3eacad34.22425665@forums.inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,700ffb83e50e0bab X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-27 22:22:11 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3eacad34.22425665@forums.inprise.com> Subject: Re: CMD or !CMD Date: Sun, 27 Apr 2003 22:18:52 -0700 Lines: 41 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: 207.175.226.26 Message-ID: <3eacb96c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1051507052 207.175.226.26 (27 Apr 2003 22:17:32 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail