home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / misc / 1433 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.6 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!sdd.hp.com!usc!nic.csu.net!koko.csustan.edu!rat!zeus!vcurley
  2. Newsgroups: comp.os.ms-windows.programmer.misc
  3. Subject: C++ in a DLL
  4. Message-ID: <1992Aug21.162805.539845@zeus.calpoly.edu>
  5. From: vcurley@zeus.calpoly.edu (Vince Curley)
  6. Date: Fri, 21 Aug 1992 16:28:05 GMT
  7. Organization: California Polytechnic State University, San Luis Obispo
  8. Keywords: MFC DLL memory new
  9. Summary: Memory problems with MFC DLL
  10. Lines: 26
  11.  
  12. I'm having some MAJOR problems using C++ in a DLL and ANY help would be
  13. appreciated...
  14.  
  15. 1) I'm getting a GP Fault on AfxGetApp() sometimes, and always on
  16.    the instruction  mov ES,[xxxx]  where xxxx is some varying address.
  17.    This doesn't happen all the time which makes it all the stranger,
  18.    but it is fairly consistant when I call one DLL from another.
  19.  
  20. 2) Even more annoying...When I call the second DLL from the first I
  21.    can't seem to do any 'new' calls.  ie pX = new X;  In this case,
  22.    when I am using the debug MFC lib the call fails in AllocMemoryDebug
  23.    on the pfnAllocHook call.  If I use Codeview and move the IP past 
  24.    this call (the default handler is just supposed to return TRUE) I
  25.    get a GP Fault on malloc (also in MEMORY.CPP).
  26.  
  27. 3) I'm using a large model DLL since that is what the SDK sample DLLTRACE
  28.    used.  Why a large model?  How important is it to have that
  29.    FilterDLLMsg function that they have?
  30.  
  31. Again, I am desperate here.  Any help you might have would be greatly
  32. appreciated...especially non-trivial examples of DLL writing.  Thanks.
  33.  
  34. Vince
  35. -- 
  36.      Vince  "Windows,  Windows,  Windows"  Curley
  37.   vcurley@demeter.calpoly.edu        CIS: 71055,3423
  38.