I don't have control about the system methods I call.
But I can run some code bits of my own in parallel.
The unmanaged part looks like:
//----
XHelper helper=new XHelper;
VARIANT v;
dispidX=...(dispid of X method)
dispidY=...(dispid of Y method)
dispidZ=...(dispid of Z method)
helper->invoke (dispidX, IID_NULL, 0x400, DISPATCH_METHOD, null, &v, null, null);
//result variant is ant IntPtr, with type VT_UINT
//prepare Invoke arguments
VARIANT *args = new VARIANT[1];
args[0]=v;
args[0].vt = VT_UNKNOWN; //force to interpret v as an Object
//invoke Y
DISPPARAMS dp;
dp.cArgs=1;
dp.rgvarg = args;
helper->invoke (dispidY, IID_NULL, 0x400, DISPATCH_METHOD, &dp, &v, null, null);
//---
(This experiment is a first step. To be of any use, the next step would be to create the char[] array on the managed side based on a pointer provided from the unmanaged side).