I've googled on this subject and I found lots of articles about it, but nothing regarding exactly the same situation.
And I can't find a way to disable it.
I'm running on VS 2008 sp 1, .net 3.5 sp1, Win XP Pro, Delphi 2009 and I have the following problem.
When attempting to raise a managed com object in the initialization part of a unit inside another UNmanaged com object an exception is thrown
"Debug Output: <mda:msg xmlns:mda="http://schemas.microsoft.com/CLR/2004/10/mda"> <!-- Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang. --> <mda:loaderLockMsg break="true"/> </mda:msg> Process regsvr32.exe (3852)"
Here the process is regsvr32.exe because I debug (run under Delphi 2009 debugger) the UNmanaged COM object registration.
The problem occurs when I debug any unmanaged com object in whose dllmain (or image initialization) - obviously - I attempt to run managed code.
How can my application hang and why? A reference to a good article on this subject would be greatly appreciated.
Anyway this exception is thrown only when debugging and it's a little(!) bit annoying (with all those OutputDebugString messages), I've to click through 20 or so messages until it's passed.
Do you know a way to add an exception for this loader exception (forgive the tautology)? May be add its type in the disabled exception list? Or set a specific registry key?
Any help will be appreciated.
Thanks in advance,
In fiery flight we would leave this hall...
- Edited by Xaoc Friday, November 07, 2008 9:28 AM