Gemeinsam zu mehr Effizienz in der Anwendungserstellung
K |
K |
||
Zeile 9: | Zeile 9: | ||
OfficeApplication.GetType().InvokeMember("Run", BindingFlags.InvokeMethod, null, OfficeApplication, | OfficeApplication.GetType().InvokeMember("Run", BindingFlags.InvokeMethod, null, OfficeApplication, | ||
parameters, modifiers, null, null);</source> | parameters, modifiers, null, null);</source> | ||
+ | |||
+ | * Eigenschaft als Object statt als Variant: <code>object Fixture { [return: MarshalAs(UnmanagedType.IDispatch)] get; }</code> |
[MarshalAs(UnmanagedType.IDispatch)]
void CallTestByName(string procName, [MarshalAs(UnmanagedType.IDispatch)] out object test2Add);
object[] parameters = { getTestClassFactoryProcedureName(className), new Object() }; ParameterModifier p = new ParameterModifier(2); p[1] = true; ParameterModifier[] modifiers = { p }; OfficeApplication.GetType().InvokeMember("Run", BindingFlags.InvokeMethod, null, OfficeApplication, parameters, modifiers, null, null);
object Fixture { [return: MarshalAs(UnmanagedType.IDispatch)] get; }