Tag Archives: mscorwks

Beware of using stack-based COM objects from .NET

COM objects that don’t have the expected lifetime can cause chaos when combined with .NETs garbage collection system.

Posted in .NET, COM, Debugging, Software Development, WinDbg | Also tagged , , , , , | Leave a comment

Getting IUnknown from __ComObject

How do you find the unmanaged COM object that’s being referenced by a .NET object?

Posted in .NET, COM, Debugging, Software Development, WinDbg, Windows | Also tagged , , , | 4 Comments

Troubleshooting an InvalidProgramException

One of the developers who uses the .NET/COM interop DLL that I wrote recently informed me that when they used it in a certain way, they would get a fatal System.InvalidProgramException. Nasty. So I set about seeing how I could find out exactly why this was happening: here are the gory details…
To spoil the ending [...]

Posted in .NET, Software Development, WinDbg, Windows | Also tagged , , , , , , , | Leave a comment