Register assembly in C++

We hired someone to build a wrapper dll so that our application could use functions in a managed .Net dll. This was done, and the dll works as it's supposed to, but one of the things we must do in order to use it is to run regasm from an elevated command prompt.

The wrapper dll is written in C++. Can what regasm is doing be incorporated into the dll?

C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe "C:\Program Files\NinjaTrader 8\bin\NinjaTrader.Client.dll" /codebase



Last edited on
You could call ShellExecuteW() with lpOperation set to "runas" and invoke the regasm.exe program as needed:

https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew#runas
Last edited on
Topic archived. No new replies allowed.