I have created a COM DLL in C#. In this DLL I am linking against a third party DLL ("thirdpartydll.dll"). When I set "thirdpartydll.dll" to be output into the Release folder during the compilation, all works fine.

But I do not want to distribute "thirdpartydll.dll" with my DLL. I would like my DLL to use the "thirdpartydll.dll" that may (or may not) have been registered by the third party.

For example, if the third party installed "thirdpartydll.dll" to C:\Program Files (x86)\Third Party\thirdpartydll.dll, then my COM DLL should use this.

Currently this does not work. I get the automatic error 80070002. I guess it means that my COM DLL can not find "thirdpartydll.dll". I am not sure why. I thought my COM DLL would find it automatically.

没有正确的解决方案

其他提示

If you do not want to care where (non COM) thirdparty.dll is installed on the target system, it has to be install into the Global Assembly Cache (GAC).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top