Re: COM Marshalling Problem
There's nothing suspicious so far in your code, and the problem may be somewhere else. Try to isolate your problem and replicate it in a short and simple compilable project, and post it here to let us see where the problem may be.
Re: COM Marshalling Problem
I'm not entirely sure you can send a raw data array out to another process just like that.
it might work with an in-process COM server, but out of process will need some kind of marshalling telling the one process how many bytes of data to transfer between the process spaces of the 2 executables. just because your function has a DataLen, doesn't mean the whole COM marshalling system knows about this too.
Sending arrays through COM is usually done with a SAFEARRAY.
1 Attachment(s)
Re: COM Marshalling Problem
In fact, it's okay to send raw bytes, and size_is(dataLen) makes the trick be possible. Proxy/Stub library is built in accordance with the IDL, and takes care of marshaling. See the sample: Attachment 31691
As I said, the problem's somewhere else.