I'm working on an Excel plugin (XLL), which communicates with COM objects. So, I have to marshall between XLOPER and VARIANT. I've got most of this working, but arrays are definitely a pain. I need to support 1- and 2D arrays.
I imagine someone has already had to deal with this before. What's the best way to simplify dealing with VARIANT, SAFEARRAY, and XLOPER (and XLOPER12)?