Results 1 to 7 of 7

Thread: Deleting a locked DLL

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195

    Deleting a locked DLL

    This might sound like a strange problem... but here goes:
    I have a VB program which uses a DLL that I made. When the program finishes it is supposed to delete the DLL. Unfortunately the program locks access to the DLL when it first uses it.
    Is the a way I can unlock it?
    Using Visual Studio .NET 2005

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Close the file handle to the DLL.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195
    ... could you give me an idea of how?
    Using Visual Studio .NET 2005

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195
    ... no then. anyone else?
    Using Visual Studio .NET 2005

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    how does your program use the dll? is it a reference? it is probably going to be pretty hard to delete it in the program that references it.. you may want to try using late binding instead and destroy all objects before closing the app.. that should work

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195
    The DLL just has some functions in it. These are declared in a Class Module, using the normal "Private Declare Sub... " function declaration.
    Can you give me an example of how I might use the technique that you described?
    Using Visual Studio .NET 2005

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195
    Anyone?
    Using Visual Studio .NET 2005

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