What types should I use in this COM Interface

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
.



Relevant Pages

  • Re: How come Ada isnt more popular?
    ... are praising is, because what about trees of strings, trees of lists etc. ... a language also shouldn't have strings ... but there are no generics instantiated. ...
    (comp.lang.ada)
  • Re: How come Ada isnt more popular?
    ... are praising is, because what about trees of strings, trees of lists etc. ... the language should not have either X or Y built-in. ... but there are no generics instantiated. ...
    (comp.lang.ada)
  • Re: Newb looking for data binding help
    ... lists to store the strings, ... Two strings, one for a system name and one for equipment name ... When the user clicks on an 'equipment' node, I'd like to display just ...
    (microsoft.public.dotnet.languages.vb)
  • Bottleneck rule
    ... groups similar strings together. ... prints out an intermediate store file to view intermediate results. ... (setf (aref store i 0) ... ;;Print output the lists of grouped strings and counts. ...
    (comp.lang.lisp)
  • Re: comments on my design of a new language?
    ... > exist, plus strings and the function type, and that is it. ... indexed by a string or a regular expression, ... > dictionaries, that terminate with literals, or (possibly ... and lists. ...
    (comp.lang.misc)