The ActiveX control takes this VARIANT as function argument:
[id(3), helpstring("method Init")] HRESULT Init([in] VARIANT a_properties);
I'm assigning it in C# as:
someCOM.Init("C:\\abc.xml");
but I got some exception on this line:
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Error!
Program: ...ode Samples\Test.exe
abnormal program termination
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
What should I do? :(
Petar Popara - 08 Sep 2005 16:20 GMT
P.S. Internally, ActiveX is expecting param to be of type BSTR (VT_BSTR).
Egbert Nierop (MVP for IIS) - 09 Sep 2005 11:19 GMT
> The ActiveX control takes this VARIANT as function argument:
>
[quoted text clipped - 6 lines]
>
> but I got some exception on this line:
Your DllImport in C# should have the object as a parameter.
The object type is marhaled to a VARIANT automatically when going to
unmanaged code.
> ---------------------------
> Microsoft Visual C++ Debug Library
[quoted text clipped - 9 lines]
>
> What should I do? :(