Subj : sweep To : Eddy Thilleman From : Jonathan de Boyne Pollard Date : Sat Mar 31 2001 05:35 pm ET> uses dos; I'm very suspicious of a library of supposed wrappers around system API functions that (a) is called "dos", and (b) doesn't appear to have a FindClose() function. I'd worry that the library was structured to operate in terms of how the DOS system API operates, rather than how the OS/2 system API operates. (DOS does directory searches using a single, fixed, data buffer that doesn't need to be opened and closed. OS/2 has a handle-based system for searching directories, where the handles need to be closed after use.) Alas! All too many people, including library implementors, think that designing things to operate in the way that DOS operates is the way to write "portable" programs, because of some shoddy reasoning on their part that DOS is some sort of "least common denominator". It isn't. And designing things to operate in the way that DOS operates is in fact a good route to producing *non*-portable programs. Even aside from the paradigm differences between DOS and better operating systems such as OS/2, it's the way to produce grossly inefficient programs. It is often inefficient to implement an interface that operates in DOS terms on top of an operating system such as OS/2. Just look at the many hoops that the libraries in most C implementations for OS/2 have to jump through in order to implement compatibility functions for the C language bindings to the DOS system API such as findfirst() and findnext(). In DOS, the C language bindings to the DOS system API are efficient, because the mapping is direct. Implementing the DOS system API on top of the OS/2 system API is not necessarily so efficient, because the mapping is not always an identity. Try rewriting your Pascal application to call the DosFind{First,Next,Close} functions in the OS/2 system API directly (if such is possible in Virtual Pascal) rather than using this "dos" library, whatever it is. ¯ JdeBP ® --- FleetStreet 1.22 NR * Origin: JdeBP's point, using Squish (2:257/609.3) .