| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: HPFS detect in Virtual Pascal? |
Hej Tosh!
Tuesday December 05 1995, Tosh Maddox writes to All:
TM> Does anyone have a snippet of code to detect a HPFS drive in OS/2 using
TM> either Turbo Pascal, BPOS2v_2 (c't), or VP, could you please post a small
TM> sample?
For Virtual Pascal, the following snippet works:
Uses
Use32, Os2Def, Os2Base, Strings;
function IsHPFS(Drive : Char) : Boolean;
Var
rc : Word;
Buffer : FSAllocate;
DrvName : String[3];
Ordinal : SmallWord;
FSQb : pFSQBuffer2;
BufLen : Word;
name : pChar;
begin
Drive := UpCase( Drive );
BufLen := 100;
GetMem( FSQb, BufLen );
DrvName := Drive+':'#0;
Ordinal := 0;
rc := DosQueryFSAttach( {at}DrvName[1], Ordinal, fsail_QueryName, FSqb, BufLen );
If rc 0 then
IsHPFSDrive := False
else
With FsqB^ do
begin
Name := szName + cbName + 1;
IsHPFSDrive := ( strComp( Name, 'HPFS' ) = 0 );
end;
end;
Allan Mertner
Development Manager, Virtual Pascal for OS/2
e-mail : vpascal{at}ibm.net
--- GoldED 2.50.A0531+
* Origin: Gravity is a myth: Earth Sucks! (2:254/283)SEEN-BY: 270/101 620/243 711/401 409 410 413 430 808 809 934 955 712/407 515 SEEN-BY: 712/517 628 713/888 800/1 7877/2809 @PATH: 254/283 259 442/403 25/10 255/1 440/4 141/209 270/101 712/515 711/808 @PATH: 711/809 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™.