int pVarResult,
int pExcepInfo,
int pArgErr) {
HResultException ex = null;
Variant[] vArgs = null;
Variant result = null;
try {
vArgs = extractVariantArrayFromDispParamsPtr(pDispParams);
result = invoke(dispIdMember, dwFlags, vArgs);
if (pVarResult != 0) {
Utils.win32_copy(pVarResult, result);
}
} catch (HResultException e) {
// Log to the console for detailed examination.
//
e.printStackTrace();
ex = e;
} catch (InvocationTargetException e) {
// If we get here, it means an exception is being thrown from
// Java back into JavaScript
Throwable t = e.getTargetException();
ex = new HResultException(t);
ModuleSpace.setThrownJavaException(t);
} catch (Exception e) {
// Log to the console for detailed examination.
//
e.printStackTrace();
ex = new HResultException(e);
} finally {
// We allocated variants for all arguments, so we must dispose them all.
//
for (int i = 0; i < vArgs.length; ++i) {
if (vArgs[i] != null) {
vArgs[i].dispose();
}
}
if (result != null) {
result.dispose();
}
}
if (ex != null) {
// Set up an exception for IE to throw.
//