Results 1 to 2 of 2

Thread: Force Unload DLL

  1. #1
    GoodJuJu is offline VB.NET Forum Newbie
    .NET Framework
    .NET 3.5
    Join Date
    Apr 2010
    Location
    England
    Posts
    24
    Reputation
    85

    Force Unload DLL

    Hi,

    I wonder if someone can help me. I have an application that loads a dll. This dll that is loaded calls and loads other dll's as it sees fit based on the filetype my apllication is dealing with. One of these DLL's 'PDFFILT.dll' (Adobe PDF IFilter dll) is not unloading itself after it has been used and is causing my appilcation to throw up an error when exiting.

    'The instruction at "0x0a5a609c" referenced memory at "0x00000014". The memory could not be "read".'
    All the functionality of the aplication works fine, it is only when closing my application that I receive this error.

    Does anybody know how I can unload this dll during my application exit routine?

    I have searched and come across "Freelibrary()" but canot seem to get it to work.

    Any help anybody can offer is much appreciated.

    Thanks

  2. #2
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    13,767
    Reputation
    1702
    Assemblies cannot be unloaded. The only way to unload an assembly is to unload the AppDomain that loaded it, which means that you'd have to load the assembly in a separate AppDomain in the first place. I have no idea about the details as I've never had to do it. If I wanted to know, I'd search the web.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •