Skip to content

Using 2 DLL's in one solution

Niels van den Berge

Asked Apr 2, 2009, 7:18 AM EDT1 answer
Share
LinkedInX
Hello there,

I'm facing a problem for which I hope to get some help on this forum.
I simplified the idea with the following case:

We have an executable (general.exe), and 2 DLL's (Calculation1.dll and Calculation2.dll). All made with C#. Both DLL's got a function called Calc(int x, int y) and return an integer.
The first dll returns value x*y and the second returns the sum of x and y.

The executable imports only Calculation.dll. Depending on which of the two DLL's I call Calculation.dll I want the general.exe to print the x*y or x+y. I'd like to be able to make another DLL with devides x by y as well for the future without changing the general.exe.

I hope I made the case clear. If you have any questions feel free to contact me.

With kind regards,
Niels

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0

    Hi,

    Thank you for your reply! I'm not familiar with WCF, so if you can help me with it I'd be really happy.

    To summarize the problem and the case:

    I want to be able to add one of the two DLL's to the same directory as the general.exe (and the DLL renamed as Calculation.dll). I want general.exe to use the Calc function in that DLL (add or multiply, depending on the DLL which is in the directory). I think it can also be solved with signing DLL's etc., but I don't know exactly how. If anyone can point me in the right direction I'd really appreciate it.

    0