[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

DLL not able to Compile

Posted on 2005-04-08
9
Medium Priority
?
264 Views
Last Modified: 2010-04-17
Hi,

I'm running into a really frustrating time in developing my DLL. I do a lot of small changes to the DLL and need to recompile it all time. The problem is 8/10 times, it will not allow me to recompile the DLL as it is still being used by some application or the o/s.

I normally unregister the DLL and then stop IIS (and the other related services) and then start it up and re-register the DLL again. Some times, it does not work, and today has been one of those days where it has been a few hours now since I first tried recompiling the DLL. I've also rebooted a few times with no improvement.

Is there another way to ensure that the DLL is completely released? Is there a DLL flush utility that would help me do this?

Thanks.

Frohike
0
Comment
Question by:Frohike
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 16

Expert Comment

by:nonubik
ID: 13734243
You can use Process Explorer from sysinternals to see who's holding your dll and then act accordingly http://www.sysinternals.com/ntw2k/freeware/procexp.shtml
Just press CTRL+G (Find DLL) ant type your dll's name.
0
 
LVL 2

Expert Comment

by:kHSw
ID: 13734407
Or you could use Who's Locking, just right-click on your DLL and kill the processes that are locking your DLL...

http://www.codeguru.com/Cpp/W-P/dll/article.php/c3641/
0
 
LVL 3

Expert Comment

by:Mig-O
ID: 13734537
try "Dependency Walker"! It saved me much time working with similar problems in my dlls.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Expert Comment

by:cloabell
ID: 13735466

Quick and dirty solution.
Download pskill:

  http://www.sysinternals.com/ntw2k/freeware/pskill.shtml

..and kill the DLL process when needed.

cloabell

0
 

Author Comment

by:Frohike
ID: 13750726
Hey all, I've tried all your suggested utilities and killed every process that are using my DLL.

You won't believe it, it still will not allow me to recompile the DLL.

The exact error msg is: Permission denied: '...path\myDLL.dll...'

I've been advised by someone that it could be something to do with the o/s itself using my DLL. If I had been using it frequently enough (which I believe I have when doing my unit testing), Windows 2000 Pro will automatically cache it for performance reasons. None of these utilities picked up any Windows processes using it, and therefore, cannot be killed.

So, if no visible process is holding my DLL, and after rebooting still does not release my DLL. By deduction, it has something to do with a file on the hard disk written by Windows. Is there way to flush this perhaps I might call this the page file?

I don't know if anyone else has encountered this problem. If anyone has experienced this any help will be appreciated.

Thanks,

Frohike
0
 

Expert Comment

by:cloabell
ID: 13750794

You have probably just tried this, but did you close and restart the visual basic environment?

Sometimes with vb6 I found that the IDE itself was locking the file.

Close vb6; restart it with your project, and compile your DLL before doing anything else.
0
 
LVL 4

Accepted Solution

by:
Diane258 earned 800 total points
ID: 13750944
Would it be possible for you to save the DLL file with a different file name?
0
 
LVL 16

Expert Comment

by:nonubik
ID: 13759688
Maybe a stupid question: is your dll read-only (or have some security restrictions)?
0
 

Author Comment

by:Frohike
ID: 13768867
Hi all, thanks for your replies so far.

nonubik, My DLL is not in readonly and there are no security restrictions.

Diane258, I tried remaking my DLL with a different filename and for some reason it actually released my DLL. I then delete my DLL and then remake it using the original filename. I don't like the sound of this, as it doesn't seem right as it appears to be locking up when it shouldn't.

Thank you all, for your help.

Frohike
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Loops Section Overview

834 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