Sure, I'm open to better suggestions, I just couldn't think of anything better for now. Is passing it through and dynamically allocating it better?
Yes, I think so.
As for the difference between arrays and pointers, I'm not too familiar with the details of widl, I just worked with what's there already. I thought the difference between arrays and pointers is, that arrays have a known length (or are local). After all, you can't really marshal a pointer if you don't know how many elements.
Unsized pointers are basically equivalent to an array of size 1. Fundamentally, every type *has* to be marshalable, or you've declared an illegal interface.
Anyway, I tested with midl now that I have it handy, and we're definitely supposed to recurse into non-array pointers. It should be simple enough to fix, but if you'd rather not then I'll send a patch.