Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • How are you generating the Runtime Callible Wrapper for the ComObject is the c# code ? Commented Nov 10, 2011 at 20:43
  • 2
    Pretty unclear how you are invoking the C# method. But you created an object[], not a string[]. Pass VT_BSTR to SafeArrayCreate() and adjust the rest of the code accordingly. Commented Nov 10, 2011 at 21:37
  • Not sure about C++, but to get a VBA client to call a C# CCW, the only way I got it working was to declare the string array argument as ref: public long DoIt3(int nFiles, ref string[] fileNames); Commented Nov 10, 2011 at 22:19
  • 2
    @Joe That was because VBA clients always pass variant parameters as VT_BYREF Commented Nov 10, 2011 at 23:05