home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / programm / 6592 < prev    next >
Encoding:
Text File  |  1992-11-20  |  2.0 KB  |  46 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!caen!destroyer!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!access.usask.ca!sue!phenix.cc.uregina.ca!craig
  3. From: craig@phenix.cc.uregina.ca (Craig Knelsen)
  4. Subject: Building DLL with C run-time functions
  5. Message-ID: <1992Nov21.050024.1244520@sue.cc.uregina.ca>
  6. Sender: news@sue.cc.uregina.ca
  7. Date: Sat, 21 Nov 1992 05:00:24 GMT
  8. Reply-To: craig@phenix.cc.uregina.ca (Craig Knelsen)
  9. Organization: Does it matter?
  10. Keywords: multi-threaded DLL run-time
  11. Lines: 33
  12.  
  13. I am attempting to build a DLL with C run-time functions from the standard
  14. and migration C Set/2 multi-threaded libraries. I have .DEF files for
  15. building both the .LIB and .DLL files that reference the required run-time
  16. functions for startup and those run-time functions that my apps reference.
  17. My .DEF file for the building the DLL includes the following:
  18.  
  19.     library mylib initinstance terminstance
  20.     data multiple nonshared readwrite loadoncall
  21.     code loadoncall
  22.     exports
  23.     ...
  24.  
  25. I can build the DLL and link my two application programs with the LIB for
  26. my DLL without any problems. I start my first program and it comes up fine.
  27. If I do a PSTAT, it shows my DLL being used by the program. While my first
  28. app is running, I try to start my second app. I get the system error dump
  29. dialog complaining about a protection violation in my dll. Not only this
  30. but if I attempt to stop my first app., it either:
  31.     1. hangs itself
  32.     2. closes its window but still does not terminate
  33.     3. hangs the system
  34. In any case, I am forced to reboot.
  35.  
  36. I have read chapter 15 of the C Set/2 User's guide on including C run-time
  37. functions in an application DLL as well as looking at sample03 in the 
  38. compiler samples directory.
  39.  
  40. Has anyone been able to accomplish what I am attempting to do? After a couple
  41. of days of reboots, its getting to be quite frustrating...
  42. -- 
  43.  
  44. Craig Knelsen        craig@phenix.cc.uregina.ca
  45.             Craig_Knelsen@f20.n140.z1.fidonet.org
  46.