See the question and my original answer on StackOverflow

The documentation stipulates the SAFEARRAY must be an array of VARIANT that contain IDispatch interface pointers, so you could do something like this (I'm using smart pointers which is easier...):

CComPtr<IFileSystemImage2> image;
CComPtr<IBootOptions> options;


// set various options here...

// create a SAFEARRAY of VARIANT
CComSafeArray<VARIANT> a(1);

// create a VARIANT of type VT_UNKNONW (or VT_DISPATCH)
CComVariant v(options);

// put it in the array
a.SetAt(0, v);

HRESULT hr = pImage->put_BootImageOptionsArray(a.m_psa);