delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/15/06:07:52

X-Authentication-Warning: smtp3.ihug.com.au: Host p513-apx1.syd.ihug.com.au [203.173.142.5] claimed to be acceleron
Message-ID: <008701c12571$6f92d330$0a02a8c0@acceleron>
From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
To: <djgpp-workers AT delorie DOT com>, "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
References: <10108150440 DOT AA14928 AT clio DOT rice DOT edu>
Subject: Re: _open.c development dif - Win2000 hacking
Date: Wed, 15 Aug 2001 20:02:46 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Reply-To: djgpp-workers AT delorie DOT com

> Included below is the SFN open code I've been working with on Windows
2000.
> For existing files this causes the device info to be correct, so the
> device in fstat() is correct.
>
> What's interesting is on my test code I get extra 7160 failures to
> the screen - from fstat() ?  Is this looking for magic numbers or
something?
First I couldn't see any 7160 calls in fstat() the only dangerous call is
the _farpeek() as per my email from last night. To save time this is what I
found:

I found last night with fstat() that  dos_mem_base and other data is not
setup as the fstat_init() function is not called. This in turn causes the
_farpeek() to fail on the following code:
> > > >                   r.x.ax = 0x71a6;      /* file info by handle */
> > > >                   r.x.bx = fhandle;
> > > >                   r.x.ds = __tb >> 4;
> > > >                   r.x.dx = 0;
> > > >                   __dpmi_int(0x21, &r);
> > > >                   if ((r.x.flags & 1) == 0
> > > >                        && (_farpeekl(dos_mem_base, __tb) & 0x07) ==

> More interesting stuff - if 7160 fails, but _chmod succeeds I think this
> is a way under Windows 2000 to know it's a device!

Where is the 7160 call in fstat()? Or does it call something else that
perfroms a 7160 call? I am puzzled as to where the 7160 call is coming from.



- Raw text -


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