Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Denied Access to DLL after use in IIS

Posted on 1998-12-31
4
Medium Priority
?
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1181366
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 100 total points
ID: 1181367
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
ID: 1181368
If you want "utility" solution, i can  send you UNLOAD.EXE

0
 

Author Comment

by:forloop
ID: 1181369
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

618 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