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