In C#, you can decorate function return values with attributes, as follows:
[return: MarshalAs(UnmanagedType.IUnknown)]
object LoadStuff();
My question is, how can I do this in C++/CLI? I have this:
[return: MarshalAs(UnmanagedType::IUnknown)]
Object^ LoadStuff();
but the compiler is erroring with 'return' : unknown attribute qualifier
.
Is there an alternate syntax which I haven't been able to find?