TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Dmitry M Golubovsky
from: David Muir
date: 1997-03-13 12:32:12
subject: Re: Identifying HPFS partitions

-=> Quoting Francois Thunus to Dmitry M Golubovsky <=-

 FT> Hello Dmitry!

 FT> 11 Mar 97 09:59, Dmitry M Golubovsky wrote to Rob Hamerling:
 
 DMG> To ALL but maybe a little off topic: what methods may be used to
 DMG> determine filesystems one from another? Looking to the partition
 DMG> table seems to be too trivial but not all medias have it.

This code is plagurized from code originally released by Mr Fitzsimmons. It 
has been converted to pascal and cropped specifically to detect only HPFS. 
Peter's original code detected a number of things aside from this and included 
errorchecking not shown here.

function HPFS (drv:char):boolean;
var
rc,len:longint;
dev:cstring;
PBTR:PFsqBuffer2;
BUFF:ARRAY[1..2048] OF CHAR;
p:string;
DNAME:STRING;
DTYPE:STRING;
DDATA:STRING;
begin
HPFS:=FALSE;
PBTR:={at}BUFF[1];
if (drv < 'C') then exit;
p:=drv+':'+#0;
move(p[1],dev,3);
len := 2048;
rc:=DosQueryFSAttach(dev, 0, FSAIL_QUERYNAME, Pbtr^, len);
if rc  0 then exit;
DNAME[0]:=chr(lo(pBtr^.CBNAME));
DTYPE[0]:=chr(lo(pBtr^.CBFSDNAME));
DDATA[0]:=chr(lo(pBtr^.CBFSADATA));
move(buff[10+pBtr^.CBNAME],dtype[1],pBtr^.CBfsdNAME);
HPFS:=dtype='HPFS';
end;

... THD ProScan support on the web, http://www.naples.net/~nfn03274
--- Blue Wave v2.12
* Origin: fks Online! * Ontario, Canada * (905)820-7273 * (1:259/423)
SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407
SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1
@PATH: 259/423 99 2424/38 11 10 12/12 396/1 270/101 712/624 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.