protected abstract Variant invoke(int dispId, int flags, Variant[] params)
throws HResultException, InstantiationException,
InvocationTargetException;
private Variant[] extractVariantArrayFromDispParamsPtr(int pDispParams) {
DISPPARAMS dispParams = new DISPPARAMS();
COM.MoveMemory(dispParams, pDispParams, DISPPARAMS.sizeof);
Variant[] variants = new Variant[dispParams.cArgs];
// Reverse the order as we pull the variants in.
for (int i = 0, n = dispParams.cArgs; i < n; ++i) {
int varArgAddr = dispParams.rgvarg + Variant.sizeof * i;