delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/31/13:03:02

Date: Sun, 31 Aug 1997 09:59:53 -0700 (PDT)
Message-Id: <199708311659.JAA19600@adit.ap.net>
Mime-Version: 1.0
To: rd AT enterprise DOT net, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: need HELP with drives and filenames

At 02:28  8/30/1997 GMT, Rodney McConnell wrote:
>Hi,
>
>Can anyone tell me a way to do the following, I'd prefer
>not to use inline assembler if possible.
>
>1: Catch DOS errors like no disk in drive/device not ready.
Hook INT 24h. This is DOS's Critical Error Handler. Ralf Brown's Interrupt
List explains the call info, get it from Simtel in directory "info" as
"inter53*.zip".
>2: Loose the DOS message place disk for drive B in drive A
On DOS 5.0 and above, INT 2Fh/AX=4A00h/CX=0000h is called when such an event
occurs. This is also documented in the Interrupt List (although it's
undocumented in DOS), but if you want to skip the message, set CX=FFFFh on
return.
>3: Detect what drives are available.
Well, the setdisk() function returns the number of available drives. All of
these may not be valid, though. All I can think of is to call some DOS
function with each and check for errors. Look in the Interrupt List, though.
>4: Read/Write win95 long file names.
Set LFN=Y in the environment. All the libc functions will support LFN
automatically.

HTH

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019