mIRC Home    About    Download    Register    News    Help

Print Thread
#27608 02/06/03 07:47 AM
Joined: Apr 2003
Posts: 7
M
Mashu Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Apr 2003
Posts: 7
Probably only codemastr can answer this, but anyway, when I want to compile a new version of my dll, I need unload my loaded dll with //dll -u $dll(1) (saves typing the filename) but mIRC doesn't seem to unload it and the dll remains locked. I even have a UnloadDll export and that doesn't help. I currently have

Code:
EXPORT UnloadDll(int i)
{
  return 0;
}

Do I need to change/add anything so mIRC can properly unload it or is there a bug in mIRC, -or- the fact that _Windows_ refuses to unload it.

Ta grin

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Mirc automatically unloads a dll after a set duration of unactivity anyways. Im sure as to the delay, but I believe the option is there. What does your DLL consist of, or what is the purpose.


-KingTomato
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well in his case it won't:
EXPORT UnloadDll(int i){ return 0;}
From the help file:
UnloadDll() is being called due to a DLL not being used for ten minutes. The UnloadDll() routine can return 0 to keep the DLL loaded, or 1 to allow it to be unloaded.

Is your intention to force your dll to stay loaded even if a timeout occurs? If not, delete that function.

Joined: Apr 2003
Posts: 7
M
Mashu Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Apr 2003
Posts: 7
Yeah, i want it to be loaded whenever mirc running as I use routines that are used so much in my script that the dll would be "very" slow if it was loaded/unloaded all the time, so once it's loaded, it stays loaded, but I need to be able to unload it so I can update it!, and quitting mirc just to update it is quite annoying. grin

Code:
//echo -a $dll(1)
C:\program Files\ircmx\data\mircmxrl.dll
//dll -u $dll(1)
[mirc doesnt output a message]
//echo -a $dll(1)
C:\program Files\ircmx\data\mircmxrl.dll


Still loaded

Last edited by Mashu; 03/06/03 07:56 PM.
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
How about during your dev stages, do code's suggestions, then once you feel you have a nice dll, replace the altered vaue.


-KingTomato

Link Copied to Clipboard