mIRC Home    About    Download    Register    News    Help

Print Thread
#249440 30/11/14 02:02 AM
Joined: Feb 2009
Posts: 5
C
Cluster Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Feb 2009
Posts: 5
Hi.

I'm developing DLL for mIRC and I can't replace it until mIRC restarts. Seems like "/dll -u" command is not working. "UnloadDll()" routine is called and "//echo -a $dll(0)" shows zero but mIRC is still using this DLL so I can't delete or replace it.

mIRC version 7.38, downloaded from official site.

Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
That's working just fine here. Have you tried the same with a DLL not written by you?


Saturn, QuakeNet staff
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
When a DLL is loaded by an application, Windows may map the DLL into the address space of other processes, depending on what the DLL does. This means that even if an application subsequently unloads the DLL, it may still be locked.

This can also happen, for example, if you are using Visual Studio to debug an application (see here). The only solution is to exit Visual Studio and/or mIRC.

And it can happen in other situations as well.

It can also happen if the DLL, or DLLs that are loaded by it, call certain APIs.

Apart from that, if $dll(0) shows that the DLL has been unloaded, this means that mIRC called FreeLibrary() to release it. If the DLL is still locked, this means that something external to mIRC is preventing it from being released.


Link Copied to Clipboard