Holger Grund wrote:
For example:
System::Runti me::Serializati on::Formatter ^f = ...;
System::Runti me::Serializati on::StreamingCo ntext ^c = ...;
StreamingContex t is a value type.
StreamingContex t^ is a reference to the boxed version
of StreamingContex t (in C# it would be object or
System.ValueTyp e). C++/CLI provides type-safe access
to boxed value types.
You should use StreamingContex t without the handle.
Yes, I figured that out that by myself.
Value types must be passed without a 'handle to object (^)'.
Also, the function pointers are always resolved as
System::IntPtr ^, but they can not be used as such directly.
For example, the PropetyInfo for the second param to EvantHandler method
constructor will return System::IntPtr,
but if you try to pass the IntPtr as a param to the constructor the
compiler will fail with:
error C3924: error in argument #2 of delegate constructor call
'System::EventH andler': pointer to member function expected.
No MSDN does not desribe C3924 at all, and how can on figure out
what the 'pointer to member function' should be?