Date: Fri, 29 Aug 1997 18:20:39 -0700 (PDT) Message-Id: <199708300120.SAA04554@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: rgh AT fia DOT net, djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Reading volume label Precedence: bulk This function works. It interposes a `.' between the 8th and 9th characters of the label (like a filename) but otherwise works fine. --cut-- #include #include #include void get_volume_label(char *buf) { struct ffblk f; findfirst("*.*",&f,FA_LABEL); /* Fortunately, the usual problem with findfirst, that it finds files with less than the attributes you wanted, does not occur with DOS version > 3.0 and a volume label search */ /* This assumes that it will never fail to be found, not necessarily a safe assumption */ strcpy(buf,f.ff_name); } There is also an ioctl call to give the volume label, but that's more complicated. --cut-- At 09:21 8/29/1997 GMT, rgh AT fia DOT net wrote: > Can anyone tell me how to read the volume label of a disk ( >using int86() possibly). I checked the FAQ and info, but they don't >give much information about how to handle int86 functions which return >pointers to real address space. The info entry seems to say that >functions which return such pointers are not supported. I hope there >is some way to read the label which is supported. For starters, __dpmi_int is the preferred way to generate real-mode interrupts. You can fetch real-mode memory using dosmemget(). Nate Eldredge eldredge AT ap DOT net