Actually I am trying to create a modified version of putty that automatically pulls password from Server using Rest. We have a C# library that provides the password(.dll). But the putty source code is in plain C. So I searched for a way to connect Managed (C#) and Unmanaged code(C/C++).I ended up in COM (Component Object Model) as a solution. The COM object stores the path of the .dll in the registry.So any language can use the dll to retrieve the password. But i stucked up with how to register the CLSID of .dll in the user machine's registry. I found that it can be possible with the installer. But I can't find anything regarding how to register it with a installer. So whether Any samples that register COM using installer or procedure for how to create installer to register COM .dll in user machine will be useful for me.
Asked
Active
Viewed 981 times
0
-
1For a .NET COM objects you can use regasm: https://learn.microsoft.com/en-us/dotnet/framework/interop/registering-assemblies-with-com or here is an example of code that does almost the same thing: https://stackoverflow.com/questions/35782404/registering-a-com-without-admin-rights – Simon Mourier Jun 18 '20 at 14:21
1 Answers
0
You can use the regsvr32.exe utility. See How to register a .dll file for more information. The MSI installer in VS provides a built-in action for that. If you are using Wix, see How do you register a Win32 COM DLL file in WiX 3?.
For managed assemblies you can use the regasm utility. Read more about this utility in the Regasm.exe (Assembly Registration Tool) section of MSDN.
Eugene Astafiev
- 47,483
- 3
- 24
- 45