• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

DLL not able to Compile

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
Frohike
Asked:
Frohike
  • 2
  • 2
  • 2
  • +3
1 Solution
 
nonubikCommented:
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
 
kHSwCommented:
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
 
Mig-OCommented:
try "Dependency Walker"! It saved me much time working with similar problems in my dlls.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
cloabellCommented:

Quick and dirty solution.
Download pskill:

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

..and kill the DLL process when needed.

cloabell

0
 
FrohikeAuthor Commented:
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
 
cloabellCommented:

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
 
Diane258Commented:
Would it be possible for you to save the DLL file with a different file name?
0
 
nonubikCommented:
Maybe a stupid question: is your dll read-only (or have some security restrictions)?
0
 
FrohikeAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now