Load / Unload Dll as runtime?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick Blackman

    Load / Unload Dll as runtime?

    I have a program that search the application path for all the Dll that
    implement a certain interface IText ,when a Dll with the interface is found
    ,I run a method called
    IText.Format() which works very beautifully but then I would like to unload
    the Dll after running the ITextFormat procedure. Any ideas about doing this?
    I was told that it had something to do with creating a new AppDomain ...

    Any help would be appreciated.


  • Andrew Gnenny

    #2
    Re: Load / Unload Dll as runtime?

    Hi,

    You may create the new AppDomain, load single assembly into it, check for
    interface, run the IText.Format() and so on. After that, you may unload the
    AppDomain and go to the next assembly.
    The assembly can be unloaded only with the parent AppDomain. You couldn't
    unload single assembly from the AppDomain.
    --
    Andrew Gnenny
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE


    "Patrick Blackman" <caribsoft@vide otron.ca> wrote in message
    news:e$nGWmTjDH A.2728@TK2MSFTN GP10.phx.gbl...[color=blue]
    > I have a program that search the application path for all the Dll that
    > implement a certain interface IText ,when a Dll with the interface is[/color]
    found[color=blue]
    > ,I run a method called
    > IText.Format() which works very beautifully but then I would like to[/color]
    unload[color=blue]
    > the Dll after running the ITextFormat procedure. Any ideas about doing[/color]
    this?[color=blue]
    > I was told that it had something to do with creating a new AppDomain ...
    >
    > Any help would be appreciated.
    >
    >[/color]


    Comment

    • Patrick Blackman

      #3
      Re: Load / Unload Dll as runtime?

      A small example would be helpful, thanks
      "Andrew Gnenny" <pulsar2003@/no-spam/email.ru> wrote in message
      news:3f83a4bf$1 @nexus.validio. com.ua...[color=blue]
      > Hi,
      >
      > You may create the new AppDomain, load single assembly into it, check for
      > interface, run the IText.Format() and so on. After that, you may unload[/color]
      the[color=blue]
      > AppDomain and go to the next assembly.
      > The assembly can be unloaded only with the parent AppDomain. You couldn't
      > unload single assembly from the AppDomain.
      > --
      > Andrew Gnenny
      > X-Unity Test Studio
      > http://x-unity.miik.com.ua/teststudio.aspx
      > Bring the power of unit testing to VS .NET IDE
      >
      >
      > "Patrick Blackman" <caribsoft@vide otron.ca> wrote in message
      > news:e$nGWmTjDH A.2728@TK2MSFTN GP10.phx.gbl...[color=green]
      > > I have a program that search the application path for all the Dll that
      > > implement a certain interface IText ,when a Dll with the interface is[/color]
      > found[color=green]
      > > ,I run a method called
      > > IText.Format() which works very beautifully but then I would like to[/color]
      > unload[color=green]
      > > the Dll after running the ITextFormat procedure. Any ideas about doing[/color]
      > this?[color=green]
      > > I was told that it had something to do with creating a new AppDomain ...
      > >
      > > Any help would be appreciated.
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...