-
September 27th, 2005, 07:39 AM
#1
dll exitinstance never called?
I have a MFC .dll that I need to have perform some housekeeping when the application that uses the .dll shuts down. The CWinApp ExitInstance function is never called, neither is the destructor. Is there a function that is called when the app that loads the .dll shuts down? I know I could create an "UnInitialize" function, but want to make the process automatic of course.
TIA
Eric
-
September 27th, 2005, 08:07 AM
#2
Re: dll exitinstance never called?
You could probably put the required code in:
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID)
where dwReason = DLL_PROCESS_DETACH
Please use meaningful question titles - "Help me" does not let me know whether I can help with your question, and I am unlikely to bother reading it.
Please remember to rate useful answers. It lets us know when a question has been answered.
-
September 27th, 2005, 08:16 AM
#3
Re: dll exitinstance never called?
Is it a COM DLL?
If not, are you doing a FreeLibrary?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|