Quantcast
Channel: how to unload Assembly?
Viewing all articles
Browse latest Browse all 5

how to unload Assembly?

$
0
0

Dear Experts.

I try to use another Vb.Net Dll in my code by:

Dim

 

params(3) AsObject

params(0) = Obj

'ByRef aObj As Object

params(1) = txtFileName.Text

'ByVal FilesPath As String

params(2) = txtUserInput.Text

params(3) =

"Class1"

 

Dim asmAs Assembly = Assembly.LoadFile(dllFilePath)

 

ForEach tAs TypeIn asm.GetTypes()

 

If (t.Name.EndsWith(className))Then

 

Dim methodAs MethodInfo = t.GetMethod("Init")

 

If method.Invoke(Nothing, params) Then

Obj = params(0)

 

ExitFor

 

EndIf

 

ExitFor

 

EndIf

 

Next

___________________________

then I want to release dll for Delete it.

as you know this routin lock dll until Main App is running.

i heared about use AppDomain that can use dll methods and then Free it.

Links : http://blogs.msdn.com/b/suzcook/archive/2003/06/12/57169.aspx

but i am new in VB.net. I need code sample for do it.

any code sample available?

 


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>