With a look of ano tools pchunter can safe unloading the DLL
Ask, is there any way I can safe unloading?
CodePudding user response:
Debugging and running, before FreeLibrary set breakpoints, see if there is not the end of the threads in a DLL?CodePudding user response:
After the test, the calling loadlibrary DLL, release freelibrary directly, and whether it will collapse; If not, see if it calls its methods, and then release before they can call the release method;CodePudding user response:
Use tools pchunter traversal threads, didn't see the thread of DLL,CodePudding user response:
After calling loadlibrary DLL, release freelibrary directly, will collapse, also didn't call methods,Its method can be used, just now I need to use after uninstall it, but the uninstall collapse
CodePudding user response:
Your program is a Debug or Release toI also met others write DLL,
Low Delphi call freelibrary when they crash,
Debugging and running, low VC F5 freelibrary time will interrupt, Release, the situation better
Low the.net, freelibrary is no problem,
I think, should be in the process of the exception shielding some code, but this kind of problem, shielding is hidden trouble,
CodePudding user response:
In the same thread loadlibrary, freelibrary? If it is a new thread in the loadlibrary, try do the COM initialization before loadlibrary (CoInitilize),CodePudding user response:
With the release ofLoadlibrary do before you COM initialization is why ah, it can be normal call
With a comparison of the underlying function NtUnmapViewOfSection is forcibly unload module, then freelibary uninstall,
But NtUnmapViewOfSection according to the specification can be directly to uninstall, don't know why you don't succeed, to call again freelibary can, although goal arrived, the feeling is not very perfect huh
CodePudding user response:
Collapse should debug the cause of the crash, speculation is not a good solutionCodePudding user response:
To implicit linking, 99% is a DLL didn't write wellCodePudding user response: