Solved

Denied Access to DLL after use in IIS

Posted on 1998-12-31
4
163 Views
Last Modified: 2010-04-16
I've written an ActiveX component in VC6 and I've registered it on an NT4 Server running IIS4. Once I make a call to the component from an ASP I can't gain access to the file again (to recompile, delete, whatever).

I've stopped the WWW, FTP and Admin services (no Gopher installed) and I wait until inetinfo.exe unloads itself, yet still I cannot gain access to the DLL. Eventually the Admin service will start up again and along with it inetinfo.exe.

How can I get IIS or whatever else may be using the DLL to let go of it?

BTW, the same thing happens with the Personal Web Server on the NT4 WS Development machine. Even after I stop the server, the DLL is locked down.

Andrew
0
Comment
Question by:forloop
  • 2
4 Comments
 
LVL 14

Expert Comment

by:AlexVirochovsky
Comment Utility
Can try unload DLL from memory:

    HMODULE hDll = ::GetModuleHandle("NAME.DLL");
    if (hDll)
      {
         char buff[101];
         ::GetModuleFileName(hDll,buff,100);
         int  nModule = GetModuleUsage(hDll);
         for (int i = 0; i < nModule; i++)
           FreeLibrary(hDll);
       }
Can be, after this you can edit DLL
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 50 total points
Comment Utility
Forcing the DLL out of memory is guaranteed to cause you some stability problems.

If the DLL is still in memory even after all the IIS services (not just the web service) have been shut down, the service you've written has a reference leak and needs to be debugged.

B ekiM
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
Comment Utility
If you want "utility" solution, i can  send you UNLOAD.EXE

0
 

Author Comment

by:forloop
Comment Utility
Well, turns out I recompiled the DLL under a new name and the new DLL acted as expected. I was able to delete it after I stopped the web services. As far as the orginal DLL. I still can't delete the file.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now