how to unload the dll - page 11

 
AlexEro >> :

I'm going to guess that it's not necessarily about the MT tester. If the MT tester somehow has a LoadLibrary loop at the beginning ... FreeLibrary at the end, and this loop is executed many times, then Windows will just lock the DLL in memory until better times and won't think to do anything to free it, but only imitate it. This is done in Windows to cache frequently used libraries.


You can assume anything you like, but the results of a simple experiment show that the dll is unloaded from the tester. Why all these fictions, it is not clear. If the tester is not closed, then yes, the dll will hang, but after closing the tester it is released. At least in my case so.

[Deleted]  
HideYourRichess >> :

You can assume anything, but the results of a simple experiment show that the dll is unloaded from the tester. I don't understand why all these fabrications. If you don't close the tester, then yes, the dll will hang, but when you close the tester, it is freed. At least for me it is so.


Oh, I had a scary thought - maybe HideYourRichess is the MetaQuotes's employee, who wrote that block of DLL's upload in MT4? Then there are no more questions. If it works for him, it MUST work for others.

 
A conspiracy theory of MT developers against poor programmers is in order.
[Deleted]  

And I checked it myself - in this particular case, a simple jartmailru DLL is held by the tester. It's holding it very tightly, my tadpole, and won't let it in, fiend. Which is, however, normal and understandable.

Process Explorer (with plugin) of course unloads it anyway - by hard unload.

Unlocker 1.8.7 does not work at all (?).

By the way, if the library uses COM+ 2.0, and also multithreaded (that is complex, as I said before), then Microsoft indicates a delay of 10 MINUTES for its / them real unloading, although we are talking about another release function:


CoFreeUnusedLibraries does not immediately release DLLs that have no active object. There is a ten minute delay for multithreaded apartments (MTAs) and neutral apartments (NAs). For single-threaded apartments (STAs), there is no delay. The ten minute delay for CoFreeUnusedLibraries is to avoid multithread race conditions caused by unloading a component DLL.

http://support.microsoft.com/kb/301357

 
HideYourRichess >> :

I willingly believe that something is not working there, but I didn't run your suspicious dll. I'm too lazy to compile it from your VC8.0 to VC6.0. I'm also too lazy to check the versions of the crt you use for compatibility. You can see in the usual headlamp that you have a dll linking to msvcr80, but the example uses msvcrt. A small thing, but not nice. Etc.

Only this fact is irrelevant, Mr Slippery.

With the script - everything is unloaded.

Oops... got embarrassed again :-).

But it's ok.

It's relative now:

HideYourRichess >> :

You can assume anything, but the results of a simple experiment show that the dll from the tester is unloaded. Why all these fictions, I do not understand. If you don't close the tester, the dll will be hanging, but after you close the tester it is freed. At least I have so.

There you go.

The man has reached the tests.

Welcome to the real world!

.

Checked the closing of the tester's panel.

So, how much clever stuff is programmed in MetaTrader!

True, without taking into account the development cycle of these very Dlls - but that's the little things.

But it is easier to close the entire MetaTrader in operation :-).

.

The most important thing: you don't have to put forward the closing of the tester's panel as an obvious fact and argument,

although your talent as a researcher in cases where you need to "take down" your opponent,

you undoubtedly have. How many subordinates would you say you have at the moment?

.

The phrase in the original should sound like this:

The tester will hold the Dll until the metatrader closes-

unless you make a non-obvious move and close the tester panel :-).

.

Bottom line: if you don't close the tester panel with your Dll- it has bugs like everyone else! :-P

[Deleted]  

Process Explorer (with plugin) of course still unloads it even with the tester - by hard unload.

Restarting the tester after unloading DLL via PrExpl - no problem. That is, personally, I would rather classify this inconvenience (let's call it that way) as a tester's glitch, rather than a feature. Serious people will create their DLL in a different window, why would they jump around, close them, open them?

 
AlexEro >> :

And I checked it myself - in this particular case, a simple DLL by jartmailru is held by the tester. The tester holds it very tightly and does not let it in, fiend. But it is normal and understandable.


Whose fault is it? I think it's the programmer's fault. Because another dll, from another programmer, doesn't do that.

[Deleted]  
HideYourRichess >> :

>> whose fault is that? >> I think it's a crooked programmer.

What do you mean, uncle? It's held by MT - MQ's Tester, which doesn't unload it from FreeLibrary. Why are you shitting on your company? You wrote this bug yourself, and now you ask us on the forum?

[Deleted]  

(in a child's voice, like in Stalin's pioneer movies of the 1940s-1950s)

Guys, let's help MetaQuotes! It will be easier for us to write MQL4 programs! Let's tell the lead programmer of MetaQuotes, named HideYourRichess, how DLLs are installed, loaded, unloaded and run! Shall we? А?! I put it to a vote. Those in favour, please raise your hands and the windows messaging service.

[Deleted]  

Moron.