|
-
July 12th, 2001, 02:38 PM
#1
Problem unloading a COM DLL
I have a simple ATL/COM DLL that wraps a C DLL. A VB client access this DLL. Whenever I exit the client, I can't compile anymore. In the form_load() vb function I create an object of the component and then I release it in the exit function. But the DLL doesn't get unloaded from memory. Why?
Here is the VB code.
option Explicit
private withevents mEvent as MsgGrabber
private Sub Form_Load()
set mEvent = new MsgGrabber
End Sub
private Sub Form_Unload(Cancel as Integer)
set mEvent = nothing
End Sub
private Sub mEvent_MessageRetrieved(byval vString as Variant)
Dim var as Variant
var = mEvent.GetMessage
MsgBox var
End Sub
private Sub Send_Click()
mEvent.SendMessage ("Client string")
End Sub
-
July 13th, 2001, 09:42 AM
#2
Re: Problem unloading a COM DLL
Never mind! The VB code terminated abnormally so the DLL was never unloaded. MSDN says that VC++ 6.0 fixes this problem but it didn't in this situation. I just restarted VC++ and compiled and everything was fine after that.
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
|