What types should I use in this COM Interface
- From: Oolis Kraprin <Oolis.Kraprin@xxxxxxxxxxxxxx>
- Date: Fri, 29 Feb 2008 00:48:14 -0800 (PST)
Hi, I am having to write a COM wrapper dll to enable the use of a c++
library in a c# .net app, and have a few questions regarding what
types to use in the interface.
I used to program quite a bit of COM, but a couple of years of c# .net
has made me stupid.
Anyway, I need to pass (from c# to the com component) a HWND window
handle, and 2 strings. The function needs to deliver back to c# 2
lists or arrays of strings.
My guess at the moment is something like:
ULONG WindowHandle
BSTR FirstString
BSTR SecondString
VARIANT* FirstReturnedStringArray or List
VARIANT* SecondReturnedStringArray or List
and I probably need to return 2 ints indicating the length of the 2
lists right, or is there some type for representing a list of array of
strings that contains the count?
I am looking for whatever makes the most sense and requires the
minimal amount of mucking aroung with marshalling etc.
Thanks a lot
.
- Follow-Ups:
- Re: What types should I use in this COM Interface
- From: Jeroen Mostert
- Re: What types should I use in this COM Interface
- Prev by Date: RE: Browser Helper Object (BHO) in C#.
- Next by Date: Return .NET array of objects to COM
- Previous by thread: Browser Helper Object (BHO) in C#.
- Next by thread: Re: What types should I use in this COM Interface
- Index(es):
Relevant Pages
|