views:

38

answers:

2

I've got a DLL on my WindowsCE device that I need to delete. (so I can upgrade it), the problem is that I can't do it.. The system will just not let go.

NOTE: I wish to Avoid a soft reset.

I have removed all reference to the DLL in the registry. I've exited my application. I just can't delete the DLL.. After a soft reset, I can delete it fine, even if I'm running the my application that should be using it.

So my question is... What's holding it open, and how do I stop it, or tell it to let go?


I've used CoFreeUnusedLibraries() and CoFreeUnusedLibrariesEX(); Both have had no effect/affect

A: 

Did you use LoadLibrary to load the Dll in your application? When you application is done using the Dll, did you call FreeLibrary(link)?

Shaihi
A: 

I attempted that, but it doesn't actually free it right away.. Seems it holds onto it for a time.
What did work.. I MOVEFILE the file to a junk location. Then I copyfile the new file into where the old file was. then I reboot the system..

Now the system loads the new file (accomplishing my goal) and I'm free to delete the old file when ever I like.

It isn't the most elegant way, but it's simple and it works.

baash05