Insert one DLL into another DLL In C #

I am creating a class library application that contains some referenced DLLs, such as Skype4COM, which is clearly not a native object, so I just want to learn how to embed this DLL in my DLL, appearing after creating the solution.

I just don’t want to see the people I used to develop this application, and I don’t want them to fight skype4com.dll to import it into their projects.

Ps: to use skype4com.dll it is necessary to register it in windows using the cmd window: regsvr32.exe dllpath

So it causes an error or is there some kind of work for something.

Thanks in advance.

Sincerely.

+3
source share
4 answers

- , . , , , , Reflector.

- . , COM- .NET 3.5, , .

, # 4.0 .NET 4.0 , COM. PIA, , COM /, . PIA.

.NET 4.0, , COM PIA, - . , , , , : . .NET 4.0 ( , ), , COM PIA .

+4

, , , Fody.Costura nuget, .

+1

COM- In-proc (DLL, regsvr32) , , COM- .

Registration with regsvr32 provides the COM classes implemented on the COM server to the registry. Later, consumers of this server will search the registry to find where the COM server is and try to load it and call the DllGetClassObject () function. If they fail, they will not be able to use the COM server. I am sure that you cannot implement and maintain the functioning of this mechanism.

0
source

This link may help ... IL merge

However, ILMerge will not work for unmanaged types.

0
source

Source: https://habr.com/ru/post/1713818/


All Articles