3rd party implicit (load-time) dll when exitting app causes invalid page fault 
Author Message
 3rd party implicit (load-time) dll when exitting app causes invalid page fault

I have a 3rd party dll (who I can not contact this week and do not have
source code) which implicitly loads into my MFC application. When I
press exit I receive a notice of invalid page fault.
- This does not happen when implicitly link this dll into a console
application.
- This does not happen when I compile and run the application in NT.
(the dll is suppose to safe in Win95)

I did a kludge to "solve" the problem. In exitInstance i added the
following code:

 HINSTANCE hInst=::GetModuleHandle("thierDll");//dll filename is
"theirDll.dll"
 if (hInst!=NULL)
 FreeLibrary(hInst);

I now I cease to receive the invalid page fault.

Could somebody help explain why I was getting invalid page fault? How
does (does it?) my kludge solve the problem?
Thank You.

--
Baruch Leiman
Software Engineer
Phasecom Ltd.
pob 45017
91450 Jerusalem, Israel

ph. 972-2-5889842
fx. 972-2-5889889



Fri, 15 Sep 2000 03:00:00 GMT  
 3rd party implicit (load-time) dll when exitting app causes invalid page fault

Just guessing: it appears there DLLMain isn't doing the right thing.
Perhaps they are deleting memory when the process detach message comes in.
At this point its too late and will cause problems.  It might run fine on NT
because NT is a little more "robust" in that since the app is gone it just
snuffs the DLL out, whereas 95 doesn't.

Again that is a purely 100% guess

--
Its a big enough umbrella,
  But its always me that ends up getting wet....

 ---------------------------------------------------------------------------
---
| Author for Pinnacle Publishing "Visual C++ Developer"
http://www.pinpub.com/ |
| http://lucifer.lotus.com/jim/main.htm
|
 ---------------------------------------------------------------------------
---



Fri, 15 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MSDEV caused an invalid page fault in Module SSSCC.DLL After Install SP2

2. CONNECT caused an invalid page fault in module KERNEL32.DLL at 017f:bff7b9f2

3. MSDEV.EXE caused an invalid page fault in module SSSCC.DLL

4. GetDiskFreeSpaceExA called with pointer causes invalid page fault in MFC dll

5. caused an invalid page fault in module ...

6. MSDEV causing invalid page fault: HELP!

7. MSDEV causing invalid page fault: HELP!

8. RasHangUp() -> RNAAPP causing invalid page fault

9. NEED HELP: Thread Termination causes invalid page fault in Release built only

10. What causes invalid page fault?

11. MSDEV invalid page faults in RCDLL.DLL and MFC42.DLL

12. MSDEV invalid page faults in RCDLL.DLL and MFC42.DLL

 

 
Powered by phpBB® Forum Software