Adam Nathan's Blog
Discussing topics that usually relate to .NET, such as Popfly, Silverlight, WPF, or COM Interop.
April 2003 - Posts
PreserveSig
For managed signatures that represent unmanaged functions, the PreserveSig pseudo custom attribute controls an important aspect of run-time behavior. In COM Interop scenarios, a C# method defined as follows: string GetName(); is treated like the following
Read More...
Pseudo custom attributes
Tomorrow I'd like to talk about the PreserveSig pseudo custom attribute, but first I thought I'd briefly point out the difference between pseudo custom attributes and "real" custom attributes. The CLR/.NET Framework has a handful of pseudo custom attributes
Read More...
GetLastError and managed code
In the Win32 world, calling the GetLastError API is often the mechanism to get additional error information when an API call fails. When calling these same Win32 APIs in managed code via PInvoke or via "It Just Works (IJW)" in managed C++, the rules are
Read More...
UnmanagedType.Struct and VARIANT marshaling
Continuing yesterday's theme of marshaling directives, today I'll talk about UnmanagedType.Struct, another poorly-named (and therefore confusing) enumeration value. If you pretend that it's called "UnmanagedType.Variant," it should make more sense. This
Read More...
The confusing UnmanagedType.LPStruct marshaling directive
MarshalAsAttribute controls marshaling behavior for managed data types that can have multiple unmanaged representations. Often, the challenge of using MarshalAsAttribute is choosing the right value from the UnmanagedType enumeration to pass to the attribute's
Read More...
Search
Go
This Blog
Home
About
Email
My Books
With Appearances In
My Sites
pinvoke.net
popfly.com
Disclaimer
Tags
Hearts
Managed Code
Misc
Non-Pro Tools
Popfly
Quizzes
Silverlight
Silverlight Unleashed
WCF
WPF
WPF Unleashed
Archives
September 2008 (1)
July 2008 (1)
June 2008 (1)
May 2008 (2)
February 2008 (1)
December 2007 (2)
October 2007 (2)
September 2007 (1)
July 2007 (1)
June 2007 (1)
May 2007 (2)
April 2007 (1)
February 2007 (2)
January 2007 (1)
December 2006 (1)
November 2006 (1)
September 2006 (1)
June 2006 (1)
May 2006 (4)
April 2006 (1)
March 2006 (1)
December 2005 (2)
November 2005 (1)
October 2005 (1)
September 2005 (12)
August 2005 (8)
July 2005 (6)
June 2005 (15)
May 2005 (8)
April 2005 (2)
September 2004 (1)
May 2004 (1)
January 2004 (1)
November 2003 (1)
October 2003 (3)
September 2003 (2)
August 2003 (2)
July 2003 (3)
June 2003 (5)
May 2003 (8)
April 2003 (5)
Syndication
RSS 2.0
Atom 1.0