问题
TVirtualTreeview is pretty much awesome, but many times when I close an window referenced by a DLL in my project that has a TVirtualTreeview in it I get the NTWaitForMultipleObjects error.
The problem is somewhere deep in TVirtualTreeview and other guys in the office have tried lots of stuff to fix it, I was just wondering if anyone else has had a similar issue in Delphi 7.
Or if it's fixed in 2009, because we've got that and are planning on upgrading our code (err.. beating our heads into the ground) soon.
回答1:
Maybe this helps.
回答2:
The thread Ulrich pointed to should be enough to solve this problem but I don't really think it's a bug because as I understand it you're doing it wrong:
http://blogs.msdn.com/oldnewthing/archive/2009/06/26/9804500.aspx
The solution is to clean up your form / treeview before DllMain gets called with DLL_PROCESS_DETACH.
来源:https://stackoverflow.com/questions/687438/ntwaitformultipleobjects-error-when-freeing-dll-in-delphi-with-tvirtualtreeview