Results 1 to 5 of 5

Thread: [RESOLVED] Third Party DLL Will Not Unlock

  1. #1

    Thread Starter
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610

    Resolved [RESOLVED] Third Party DLL Will Not Unlock

    Hi All,

    I have a third party DLL I use to access their application. I create a object referencing their DLL use it clean up the object. But I still have the DLL locked even after the clean up. I have also place the function calling the DLL into another class, and then I called my class, which called the third party DLL and still I can't unlock the DLL. The last thing I did was to try and put my class that called the third party DLL as part of an AppDomain. I unloaded the domain and still the DLL was lock.

    Can anyone give me a pointer on how to call a DLL but then have it not be locked after I am done using the functions in it.

    Thanks Steve
    This space for rent...

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Third Party DLL Will Not Unlock

    What do you mean by "locked"?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610

    Re: Third Party DLL Will Not Unlock

    The DLL is loaded into memory. When my program loads the DLL it is initialized with certain values set by configuration files. As long as it is loaded in memory, I cannot get it to reinit.

    If I exit completely out of my program the DLL is then removed from memory and then I can reset it using new values.

    I am hoping to do one of two things have it be able to unload out of memory will leaving my program open. Alternatively, create a helper program that will run the functions of the DLL I need and then pass back the information I need to my main program.
    This space for rent...

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Third Party DLL Will Not Unlock

    Is this DLL a .NET assembly or a COM library? Are you Disposing the objects that you create correctly, assuming that the author has provided the means?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610

    Re: Third Party DLL Will Not Unlock

    It is setup as an interop so I am assuming that it is a .net component. I am using
    Code:
    if (client != null) Marshal.ReleaseComObject(client);
    to unload the objects out of my program and I then set it to null.
    This space for rent...

Posting Permissions

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



Click Here to Expand Forum to Full Width