Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!bu-cs!halleys!ulowell!page From: page@ulowell.cs.ulowell.edu (Bob Page) Newsgroups: comp.sys.amiga Subject: Re: Dos library/SetFunction() question Message-ID: <1260@ulowell.cs.ulowell.edu> Date: Fri, 8-May-87 01:03:41 EDT Article-I.D.: ulowell.1260 Posted: Fri May 8 01:03:41 1987 Date-Received: Sat, 9-May-87 16:40:35 EDT References: <455@inria.UUCP> Reply-To: page@ulowell.cs.ulowell.edu (Bob Page) Organization: University of Lowell Lines: 27 Summary: You can't SetFunction a DOS call rouaix@inria.UUCP (Francois Rouaix) wrote in article <455@inria.UUCP>: >I would like to change some functions in dos.library, adding new features >to CurrentDir() for example. Sorry, no can do. For one reason, the dos.library jump table ISN'T one. I mean, it is, but it's more than that. It's not a Exec (RKM) library. The other reason: It's a BCPL library. If you call a BCPL "function" with a C string, it first converts it into a BSTR, then calls its "internal" function. Some might do the conversion directly if they know nobody will be calling it from within the BCPL environment, but I bet most call a CSTR -> BSTR conversion routine first. So how DO you do it? You have to poke around the guts of DOS and find the "internal" function - the one that does all the work. Find its address, and change the location to your own location. Remember if you're passing string params in, you'd better be accepting BSTR params, not C. Oh -- this is not supported by anybody, and will probably break in a future release of the system. But then again, maybe by then we'll have a real process manager and file system. ..Bob -- Bob Page, U of Lowell CS Dept. page@ulowell.{uucp,edu,csnet}