Hello
Can anybody tell me how I use the MarshalAs-Attribute to mark a
parameter as a VARIANT which contains a SAFEARRAY?
Or can I rebuild a structure VARIANT which I can use to transport a
SAFEARRAY?
Thanks in advance
Sebastian
Egbert Nierop (MVP for IIS) - 06 Oct 2005 10:12 GMT
> Hello
> Can anybody tell me how I use the MarshalAs-Attribute to mark a
> parameter as a VARIANT which contains a SAFEARRAY?
the .NET runtime, marshals such variable automatically including the
contained array except some very COM specific things like VT_RECORD
> Or can I rebuild a structure VARIANT which I can use to transport a
> SAFEARRAY?
>
> Thanks in advance
> Sebastian
Sebastian W - 06 Oct 2005 12:46 GMT
In my case it does not.
I get a COMException: "Type mismatch" whatever I do.
The only thing I can use as a value is null / nothing. Everything else
crashes.
Egbert Nierop (MVP for IIS) - 06 Oct 2005 18:57 GMT
> Hello
> Can anybody tell me how I use the MarshalAs-Attribute to mark a
[quoted text clipped - 5 lines]
> Thanks in advance
> Sebastian
Can you show your complete DllImport and your COM or unmanaged declaration?