regasm

Overloads in COM interop (CCW) - IDispatch names include suffix (_2, _3, etc)

拟墨画扇 提交于 2019-11-27 06:27:13
问题 I have a managed assembly containing a few classes, and those classes have overloaded methods. I expose the assembly to COM/IDispatch callers via [ComVisible(true)] ..and also setting the proper Guid, on the assembly itself. I do not define an explicit interface for the COM interop. It's all done dynamically. I run regasm.exe /codebase on the managed DLL and it registers it for COM interop. When I run OleView, I can see the ProgId's of the various classes in the assembly. But, browsing into

What is difference between RegAsm.exe and regsvr32? How to generate a tlb file using regsvr32?

妖精的绣舞 提交于 2019-11-27 04:21:49
问题 Can any body tell me what is the difference between regsvr32 and RegAsm? My Dll is in C#, so how can I import the classes to c++? 回答1: regsvr32 will load the library and try to call the DllRegisterServer() from that library. It doesn't care what DllRegisterServer() actually does - it just calls that function and checks the returned value. You use it to register COM servers in unmanaged DLLs. It can't generate a .tlb file. regasm will register a COM-exposed .NET assembly as a COM server. You

Use Visual Studio Setup Project to automatically register and GAC a COM Interop DLL

痴心易碎 提交于 2019-11-27 03:43:48
I've created a .NET assembly for COM interop and it is working well on my development machine. I'm currently trying to figure out how to deploy the DLL to a target machine using Visual Studio's "Setup Project." How can I use the VIsual Studio setup project to do the following things: Register the assembly (currently using regasm ). The assembly needs to be registered successfully and the type library (.tlb) needs to be registered successfully . This answer suggests scrapping regasm in favor of custom code. I this is a good idea? If so, how does this code get included in the setup project? This

Calling regasm without administrative rights for COM interop in Excel VBA

梦想与她 提交于 2019-11-26 22:22:58
问题 A workaround for calling regasm without the admin rights was described here already: COM Interop without regasm I'm trying to create a COM library that my users can deploy and use from Excel VBA without the admin privileges. I liked the regasm workaround, since it seems that people don't have much success with using registration-free COM objects from Excel VBA. I also want early binding so my users can benefit from syntax completion. The accepted answer in the question mentioned above,

regasm RA0000: No types were registered

不羁岁月 提交于 2019-11-26 21:53:27
问题 I have a C++/CLI assembly (compiled for .NET 3.5 that comes with Windows 7). The assembly is marked as ComVisible(true) . It contains 2 classes and 1 interface. Both classes are marked as ComVisible(false) so they shouldn't matter. The interface is marked with InterfaceType(ComInterfaceType::InterfaceIsIUnknown) and a specific GUID. This interface needs to be registered. When I try to register this assembly using RegAsm.exe AssemplyName , I get this warning: RegAsm : warning RA0000 : No types

Registering .Net COM DLLs without Admin rights / regasm

大兔子大兔子 提交于 2019-11-26 19:30:52
问题 Recently, I wrote a class library in C# for use in Office applications, including a critical Access application used by ~70 people. For users with admin rights, registering the DLL is trivial, but getting the DLL working on other machines was problematic. Registering the DLL for use with admin privileges Build the DLL in Visual Studio. Ensure these options are selected on the project's Application tab: Output Type : Class Library Assembly Information : Make assembly COM-visible : Checked Use

Registering a COM without Admin rights

让人想犯罪 __ 提交于 2019-11-26 16:46:48
问题 I want to register a .net assembly as COM. In fact what that means as far as I know is, that instead of HKEY_CLASSES_ROOT I want the entries to be written in HKEY_CURRENT_USER/Software/Classes , so that UAC/Admin rights are not needed. Found two solutions of that problem, with both I'm struggling: 1) Programmatically way , with following code: IntPtr key; var openKeyresult = RegOpenKeyEx(HKEY_CURRENT_USER, "SOFTWARE\\Classes", 0, (int)RegistrySecurity.KEY_WOW64_64KEY, out key); var