(Die Seite wurde neu angelegt: „* Object statt Variant in COM Interface: <code>[MarshalAs(UnmanagedType.IDispatch)]</code> <source lang="csharp">void CallTestByName(string procName, [MarshalAs(U…“) |
|||
(Der Versionsvergleich bezieht 3 dazwischenliegende Versionen mit ein.) | |||
Zeile 1: | Zeile 1: | ||
+ | [[en:Notes]] | ||
* Object statt Variant in COM Interface: <code>[MarshalAs(UnmanagedType.IDispatch)]</code> | * Object statt Variant in COM Interface: <code>[MarshalAs(UnmanagedType.IDispatch)]</code> | ||
<source lang="csharp">void CallTestByName(string procName, [MarshalAs(UnmanagedType.IDispatch)] out object test2Add); | <source lang="csharp">void CallTestByName(string procName, [MarshalAs(UnmanagedType.IDispatch)] out object test2Add); | ||
Zeile 16: | Zeile 17: | ||
* VBEIDE-Fenster mit ms.net erzeugen | * VBEIDE-Fenster mit ms.net erzeugen | ||
*:[http://www.mztools.com/articles/2006/MZ2006007.aspx HOWTO: Create a dockable toolwindow from a Visual Studio .NET add-in] | *:[http://www.mztools.com/articles/2006/MZ2006007.aspx HOWTO: Create a dockable toolwindow from a Visual Studio .NET add-in] | ||
+ | [[NewTestRunner|New TestRunner]] |
[MarshalAs(UnmanagedType.IDispatch)]
void CallTestByName(string procName, [MarshalAs(UnmanagedType.IDispatch)] out object test2Add); object Fixture { [return: MarshalAs(UnmanagedType.IDispatch)] get; } object Parent { [param: MarshalAs(UnmanagedType.IDispatch)] set; [return: MarshalAs(UnmanagedType.IDispatch)] get; }
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);