1

What's the proper way to pass an array of strings from managed C++ to VBA? I want to pass a string array from Managed C++ out to VBA. What's the best way to do this?

2 Answers 2

2

Just use an array<String^>^, the COM interop built into the CLR turns it into a COM Automation compatible array, a SAFEARRAY of BSTR.

Sign up to request clarification or add additional context in comments.

Comments

0

You might want to look at some form of RPC, or something that acts as a middle man. I've seen instances of Facebook Thrift I believe, but I don't think that would suit your needs due to the overhead, and I am not sure if it supports VBA. Also worth noting is the mangled C++, it would be better to declare them with __cdecl "c" or something of the sort to avoid that problem, and get unmangled names.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.