Freigeben über


Adam Nathan's Old Blog

Please visit https://adamnathan.net instead!

Gotcha with STAThreadAttribute and Managed C++

Managed thread objects have an ApartmentState property that can be set to STA or MTA. But setting...

Author: Adam Nathan [MSFT] Date: 07/18/2003

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...

Author: Adam Nathan [MSFT] Date: 07/01/2003

Quiz: Gotcha with Exceptions and HRESULTs

The C# code below, when executed, prints the following: 0x80004002 0x80004002 Who can figure out why...

Author: Adam Nathan [MSFT] Date: 06/13/2003

CLR SPY and Customer Debug Probes: The Invalid IUnknown and Invalid VARIANT Probes

Whereas probes like Collected Delegate or Object Not Kept Alive catch coding mistakes in managed...

Author: Adam Nathan [MSFT] Date: 06/11/2003

CLR SPY and Customer Debug Probes: The Object Not Kept Alive and Buffer Overrun Probes (A Quiz)

The Object Not Kept Alive and Buffer Overrun probes are unlike any other CDPs, because they do not...

Author: Adam Nathan [MSFT] Date: 06/05/2003

TechEd Book Signing

I'll be doing a book signing (for .NET and COM: The Complete Interoperability Guide) at the TechEd...

Author: Adam Nathan [MSFT] Date: 06/03/2003

CLR SPY and Customer Debug Probes: The Collected Delegate Probe

The most common mistake made when passing a delegate to unmanaged code (marshaled as a function...

Author: Adam Nathan [MSFT] Date: 06/01/2003

TechEd Bloggers

Tomorrow morning I'm headed for Dallas, Texas to speak at TechEd 2003. Sonja Keserovic and I are...

Author: Adam Nathan [MSFT] Date: 05/30/2003

CLR SPY and Customer Debug Probes: The PInvoke Calling Convention Mismatch Probe

Defining a PInvoke signature and using DllImportAttribute correctly can be difficult to do, and you...

Author: Adam Nathan [MSFT] Date: 05/21/2003

Blogging troubles resolved

I've fixed this posting, so read on!

Author: Adam Nathan [MSFT] Date: 05/15/2003

CLR SPY and Customer Debug Probes: The Marshaling Probe

As promised, here's my first entry with more details about Customer Debug Probes and CLR SPY. The...

Author: Adam Nathan [MSFT] Date: 05/15/2003

Introducing Customer Debug Probes and CLR SPY

Version 1.1 of the .NET Framework introduces a handy feature called Customer Debug Probes (CDP)....

Author: Adam Nathan [MSFT] Date: 05/13/2003

Structures with embedded string fields

Tuesday's quiz used character arrays to represent string fields of the DEVMODE structure. Why not...

Author: Adam Nathan [MSFT] Date: 05/09/2003

Quiz: What's wrong with the following code?

The following C# code has the goal of enabling managed code to call CreateDC, but it's incorrect....

Author: Adam Nathan [MSFT] Date: 05/06/2003

size_is in managed code?

IDL has a size_is attribute (as well as length_is, first_is, last_is, max_is, ...) that decorates a...

Author: Adam Nathan [MSFT] Date: 05/06/2003

PreserveSig

For managed signatures that represent unmanaged functions, the PreserveSig pseudo custom attribute...

Author: Adam Nathan [MSFT] Date: 04/30/2003

Pseudo custom attributes

Tomorrow I'd like to talk about the PreserveSig pseudo custom attribute, but first I thought I'd...

Author: Adam Nathan [MSFT] Date: 04/29/2003

GetLastError and managed code

In the Win32 world, calling the GetLastError API is often the mechanism to get additional error...

Author: Adam Nathan [MSFT] Date: 04/25/2003

UnmanagedType.Struct and VARIANT marshaling

Continuing yesterday's theme of marshaling directives, today I'll talk about UnmanagedType.Struct,...

Author: Adam Nathan [MSFT] Date: 04/24/2003

The confusing UnmanagedType.LPStruct marshaling directive

MarshalAsAttribute controls marshaling behavior for managed data types that can have multiple...

Author: Adam Nathan [MSFT] Date: 04/23/2003

Disclaimer

These postings are provided "AS IS" with no warranties, and confer no rights.

Author: Adam Nathan [MSFT] Date: 04/04/2003

<Previous