🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3182

Re: Find_First/Next for DOS + OS/2

#3182
From: Bob Eager
Date: Fri, 07 Jun 1991 12:46
23 lines
1904 bytes
In article <9106070209.AA12081@grape.ecs.clarkson.edu>, kenkahn@pksmrvm.vnet.ibm.com (Kenneth A. Kahn) writes:
> OS/2 has two API's, DosFindFirst and DosFindNext.  They are both family APIs
> which means a program compiled with them will run in both DOS and OS/2 mode.
> To create a Family Application, first compile your program for OS/2 then use
> the BIND utility on it to allow it to work under DOS.

This is true. However, there are some problems. If you want to do a recursive
scan of a directory structure under DOS, you have to save the context in the
DTA before starting a scan of a different directory. This is done by using
the DTA-changing DOS calls, and I assume this is how the MSC _findfirst/next
works. 

There isn't a DTA under OS/2; you create handles to directories and just use
the right one to get the required context. Fine, except that if you use the
OS/2 calls (DosFindFirst/Next), under FAPI you have only one directory
handle and no way to save or restore context. I ended up writing two lots
of code that have no real overlap.
----------------------------+----------------------------------------------
Bob Eager                   | University of Kent at Canterbury
rde@ukc.ac.uk               | +44 227 764000 ext 7589
rde@ibmpcug.co.uk           |
100016.2770@compuserve.com  |
----------------------------+----------------------------------------------
Technical Details
Message-ID: <22552.284f8019@cluster@ukc.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!ukc!harrier.ukc.ac.uk!zodiac.ukc.ac.uk!cur022
References: <9106070209.AA12081@grape.ecs.clarkson.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!ukc!harrier.ukc.ac.uk!zodiac.ukc.ac.uk!cur022
From: cur022%cluster@ukc.ac.uk (Bob Eager)
Newsgroups: comp.os.os2.programmer
Subject: Re: Find_First/Next for DOS + OS/2
Message-ID: <22552.284f8019@cluster@ukc.ac.uk>
Date: 7 Jun 91 12:46:17 GMT
References: <9106070209.AA12081@grape.ecs.clarkson.edu>
Organization: Computing Lab, University of Kent at Canterbury, UK.
Lines: 23