🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
2 messages
2 total messages Started by Kenneth A. Kahn Fri, 07 Jun 1991 02:27
Find_First/Next for DOS + OS/2
#3180
Author: Kenneth A. Kahn
Date: Fri, 07 Jun 1991 02:27
4 lines
605 bytes
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.
Re: Find_First/Next for DOS + OS/2
#3182
Author: 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  |
----------------------------+----------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads