home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5377 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.9 KB  |  52 lines

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