Holger Grund wrote:
For example:
System::Runtime::Serialization::Formatter ^f = ...;
System::Runtime::Serialization::StreamingConte xt ^c = ...;
StreamingContext is a value type.
StreamingContext^ is a reference to the boxed version
of StreamingContext (in C# it would be object or
System.ValueType). C++/CLI provides type-safe access
to boxed value types.
You should use StreamingContext 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::EventHandler': 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?