oleview

Is it possible to expose a C# Enum to COM Interop callers, and if so, how?

感情迁移 提交于 2019-12-06 18:30:02
问题 I have a managed assembly that gets called via COM Interop. Like a VBScript client, a Perl client, and so on. The classes are decorated with [ClassInterface(ClassInterfaceType.AutoDual)] [GuidAttribute("ebc25cf6-9120-4283-b972-0e5520d0000E")] [ComVisible(true)] Then of course I do the regasm thing, and all the methods work just fine. But there are also enum types in the assembly. I'd like to use symbolic names COM applications, for the enum values. How do I expose the enums via COM interop?

Is it possible to expose a C# Enum to COM Interop callers, and if so, how?

拥有回忆 提交于 2019-12-05 01:21:12
I have a managed assembly that gets called via COM Interop. Like a VBScript client, a Perl client, and so on. The classes are decorated with [ClassInterface(ClassInterfaceType.AutoDual)] [GuidAttribute("ebc25cf6-9120-4283-b972-0e5520d0000E")] [ComVisible(true)] Then of course I do the regasm thing, and all the methods work just fine. But there are also enum types in the assembly. I'd like to use symbolic names COM applications, for the enum values. How do I expose the enums via COM interop? Do I just need to add these attributes? [GuidAttribute("ebc25cf6-9120-4283-b972-0e5520d0000E")]

Is there a tool for exploring/testing COM objects?

放肆的年华 提交于 2019-11-28 21:28:14
I'm trying to automate a process by using a COM object from Python (win32com), but I'm not getting the expected results... Is there a tool to explore/test COM objects without having to write a specific program? I mean, is there something that allows e.g. to instantiate a COM object and call its methods? (Basically I'm trying to find out if my unexpected results are win32com's fault, and I'd like to avoid installing Visual Studio to write a C# app) I actually wrote a replacement for the SDK tool OleView (afaik it doesn't support calling methods only enumerating) unimaginatively called