July 2003 - Posts

CLR SPY and Customer Debug Probes: The Thread Changing Apartment State Probe
The last blog touched on apartment states of managed threads, which the CLR tracks for COM interoperability purposes. But if an application changes the apartment state of a thread being tracked by the CLR (via unmanaged code or direct calls to CoUninitialize/CoInitialize), Read More...
Posted 21 July 03 06:18 by Adam Nathan | 13 Comments   
Filed under
Gotcha with STAThreadAttribute and Managed C++
Managed thread objects have an ApartmentState property that can be set to STA or MTA. But setting this property on the main thread doesn't work reliably because the CLR might set the apartment state to MTA (by calling CoInitializeEx (NULL, COINIT_MULTITHREADED)) Read More...
Posted 18 July 03 02:45 by Adam Nathan | 6 Comments   
Filed under
CLR SPY and Customer Debug Probes: The Disconnected Context and Unmarshalable Interface Probes
When managed code interacts with COM objects via RCWs, the CLR handles the COM plumbing for you. An important part of this plumbing involves marshaling wrapped interface pointers across contexts. When a COM interface pointer needs to be marshaled from Read More...
Posted 01 July 03 01:27 by Adam Nathan | 6 Comments   
Filed under
Page view tracker