S
spacejay
I'm programming an VB.NET application wich is using a third-party
COM-DLL-module. The Module is only loaded if needed.
And now my problem: My Application doesn't end correct and hang up
itself. After I have closed my application, i can see in the task
manager a CPU Load about over 95%. I could verify that this only
happens, if the COM Module was used by my application. If the Module
wasn't used then my application ends correct.
With an extendend Taskmanager I could unload manual single DLL's which
an application is using. And if I unload the COM Module DLL manual, so
my application ends correct.
Now my question: Is it possible (and how) to unload a DLL, which my
application has loaded dircet by vb code?
I'm very thankfully for every of your answers.
Greets
Jan
--------Example---------
'The Definition of the COM-Module
Private m_FaktNT As FaktNT.OLESrv
....
'If I need the COM-Module, I make a new Instance of the COM-Module
m_FaktNT = New FaktNT.OLESrv()
....
'Now I can use the Interfaces of the Module
m_FaktNT.AdrdGetName()
m_FaktNT.AdrdGetField()
....
'At the end of my application I release the COM-Object from my
application
While Marshal.ReleaseComObject(m_FaktNT) >= 0
End While
'And set set the Reference to Nothing
m_FaktNT = Nothing
COM-DLL-module. The Module is only loaded if needed.
And now my problem: My Application doesn't end correct and hang up
itself. After I have closed my application, i can see in the task
manager a CPU Load about over 95%. I could verify that this only
happens, if the COM Module was used by my application. If the Module
wasn't used then my application ends correct.
With an extendend Taskmanager I could unload manual single DLL's which
an application is using. And if I unload the COM Module DLL manual, so
my application ends correct.
Now my question: Is it possible (and how) to unload a DLL, which my
application has loaded dircet by vb code?
I'm very thankfully for every of your answers.
Greets
Jan
--------Example---------
'The Definition of the COM-Module
Private m_FaktNT As FaktNT.OLESrv
....
'If I need the COM-Module, I make a new Instance of the COM-Module
m_FaktNT = New FaktNT.OLESrv()
....
'Now I can use the Interfaces of the Module
m_FaktNT.AdrdGetName()
m_FaktNT.AdrdGetField()
....
'At the end of my application I release the COM-Object from my
application
While Marshal.ReleaseComObject(m_FaktNT) >= 0
End While
'And set set the Reference to Nothing
m_FaktNT = Nothing