Question

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.

No correct solution

OTHER TIPS

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top