How can you tell if your code is being called from within DllMain? You could use an undocumented function from ntdll.dll.
How can you tell if your code is being called from within DllMain? You could use an undocumented function from ntdll.dll.
Interop assemblies containing certain constructs will cause a BadImageFormatException in .NET 4.0
COM objects that don’t have the expected lifetime can cause chaos when combined with .NETs garbage collection system.
Thinking of adding some code to your DLLs DllMain function? STOP!
I’ve just noticed a nice little feature in Visual Studio 2010 Beta 2: pinned DataTips. Values displayed in the debugger as you hover over a variable can now be pinned in place and remain aligned with the source. They can even have annotations added… Tasty!
How do you find the unmanaged COM object that’s being referenced by a .NET object?
(I had problems with WordPress choking on this long post, so I’ve split it into 2 parts. The first part is here. This is the second part).
VMMap is a new tool from Mark Russinovich et al that’s very useful for diagnosing virtual memory/address space exhaustion issues. I describe it here, and give some information that should help you interpret what it reports.
It seems that the extremely useful !locks command is broken in 6.11.1.40x, the current and previous release of WinDbg from the debugging tools for Windows.
You’ll get errors like:
0:007> !locks
NTSDEXTS: Unable to resolve ntdll!RTL_CRITICAL_SECTION_DEBUG type
NTSDEXTS: Please check your symbols
The suggested solution seems to be to roll-back to version 6.10.3.233, available from here, or you can just [...]