🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2580

Re: using OpenFile in BC++ (was Re: MS Windows Classes)

#2580
From: Don CORBITT
Date: Thu, 09 May 1991 18:37
38 lines
1787 bytes
In article <1991Apr30.115545.5197@borland.com> sidney@borland.com (Sidney Markowitz) writes:

[some stuff about OpenFile() not working with BI's read()]

>In BC++, the handle that is returned by OpenFile() or _lopen() can be
>passed to  _lread(), _lwrite() and the other SDK file I/O functions,
>but not to read(), write(), and similar RTL file handle I/O functions.

true.

>The handle that is returned by open() can be used by read(), write(),
>etc., but not by _lread(), _lwrite(), etc.

false.

>The problem is that both OpenFile() and open() use some auxillary data
>structures in parallel with the DOS file handles, and OpenFile() is
  [ BI's open() does, but not OpenFile()  (I believe :-)]
>                         the workaround is to use only SDK functions or
>only RTL functions for handle file I/O.

a good suggestion.

>The low level RTL routines _read(), _write(), etc., appear to work
>with both types of handles.
>
> -- sidney markowitz <sidney@borland.com>

Hi Sidney.

_lread translates into a direct call to DOS, and only cares that its 
handle be a valid DOS file handle.

I'm a low kinda guy, so I just use _lopen() or _lcreat(), and then
_lread(), etc for access.

--
Don Corbitt, Microsoft Windows
Technical Details
Message-ID: <72251@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!microsoft!donc
References: <1991Apr23> <149000023@primerd> <1991Apr30.025244.5815@mnemosyne.cs.du.edu> <1991Apr30.115545.5197@borland.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!microsoft!donc
From: donc@microsoft.UUCP (Don CORBITT)
Newsgroups: comp.windows.ms.programmer
Subject: Re: using OpenFile in BC++ (was Re: MS Windows Classes)
Message-ID: <72251@microsoft.UUCP>
Date: 9 May 91 18:37:59 GMT
References: <1991Apr23> <149000023@primerd> <1991Apr30.025244.5815@mnemosyne.cs.du.edu> <1991Apr30.115545.5197@borland.com>
Reply-To: donc@microsoft.UUCP (Don CORBITT)
Organization: Microsoft Corp., Redmond WA
Lines: 38