funcObjVar = window.getProperty(functionId);
funcObj = funcObjVar.getAutomation();
int callDispId = funcObj.getIDsOfNames(new String[]{"call"})[0];
// Invoke it and return the result.
//
return funcObj.invoke(callDispId, vArgs);
} finally {
if (funcObjVar != null) {
funcObjVar.dispose();
}
if (funcObj != null) {