home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!unipalm!johnt
- From: johnt@unipalm.co.uk (John Taylor)
- Subject: Re: Far Pointer Problem in DLLs
- Message-ID: <1993Jan26.110458.29522@unipalm.co.uk>
- Organization: Unipalm Ltd., 216 Cambridge Science Park, Cambridge CB4 4WA, UK
- References: <ofLUJOC00WB4IPW0UA@andrew.cmu.edu>
- Date: Tue, 26 Jan 1993 11:04:58 GMT
- Lines: 41
-
- Andrew Joseph Kompanek <ak10+@andrew.cmu.edu> writes:
-
- ....
-
- >Now, in another part of my code I have a structure which maintains info. about
- >state of several open files (opened with fopen()), including (FILE *)
- >file handles. I'm getting the same UAE and it looks like commenting
- >out the references to references to the pointer fixes it.
-
- >All of this code is my own source I'm porting from Unix. Is there a way
- >for it to automatically handle these file pointers properly even though
- >it doesn't look like there are far versions of fopen, etc.?? It seems
- >to me, the compiler should be smart enough to swap in right data segment
- >and convert the pointer to a near pointer... assuming the function doesn't
- >need "near" data from more than one segment.
- >any advice out there on a transparent portable way to fix the problem with
- >the file pointers? Use less "data" is unfortunately not a good answer...
-
- >Any help would be much appreciated.
-
- I've not got normal file handling to work in a DLL at all.
- You need to use the Windows File handling routines, or _lopen,_lclose etc ...
- depending on what best fits what you are trying to do.
-
- As far as the portablitiy issues - give up.
- DLL and portable are not two things you normally say in the same sentance.
- There are a lot of standard functions that just don't work in DLL's, for no
- real reason that I can see, except to make things difficult.
-
- JohnT
- johnt@unipalm.co.uk
-
-
-
- >Thanks,
-
- >Drew
-
- >Andrwe Kompanek
- >Dept. of Human Genetics
- >University of Pittsburgh
-