I have 2 unmanaged dlls which have exactly same set of function (but slightly different logic).
How can I switch between these 2 ddls during runtime?
now I have:
[DllImport("one.dll")]
public static extern string _test_mdl(string s);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Expanding on the existing answers here. You comment that you don’t want to change existing code. You don’t have to do that.
You keep using _test_mdl in your existing code, and just place the if-statement in a new version of that method, calling the correct underlying method.