Groups | Blog | Home
all groups > dotnet interop > august 2003 >

dotnet interop : Help! I would like to call an old ActiveX Component from C#...


carolina_walter2003 NO[at]SPAM yahoo.com
8/11/2003 9:11:15 AM
Hello everybody!

I am quite beginner in CSharp, and i have a big problem (perhaps
simple to solve??).
Here it is:

I am coding an ActiveX component with VC++ 6.0. One of the method of
this control should dispatch in my Ax Control a bitmap image data
passed as an IN parameter as a byte*, or byte[].
This is quite simple.

The probleme is that .NET translates the type of this kind of
parameter in something like object or ref object. It's impossible for
me to fill and pass this parameter from C# to my ActiveX Component.

Please, help me! ;)

What type of data should i use in my ActiveX Method ? (VARIANT,
VARIANT*, SAFEARRAY, short *.....). What is the easier?

And then, what can i do in my CSharp progran to call correctly my
ActiveX Component?

Kinds Regards!

Mattias Sjögren
8/12/2003 1:03:10 PM
Carolina,

[quoted text, click to view]

Sounds like you'd want to use a SAFEARRAY(BYTE).



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
AddThis Social Bookmark Button