// prepare function and "call" property
Variant functionVariant = window.getProperty(functionId);
OleAutomation function = functionVariant.getAutomation();
int callId = function.getIDsOfNames(new String[]{"call"})[0];
// dispose function variant (we have automation) and fill information object
functionVariant.dispose();
functionInfo = new NativeFunctionInfo(function, callId);
m_nativeFunctions.put(name, functionInfo);
}
// invoke function
return functionInfo.m_function.invoke(functionInfo.m_callId, args);