• Advertisement
Sign in to follow this  

[.net] Calling C++ dll which calls C# dll outside of .NET

This topic is 3182 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Basically here's what I have going on. Wise Installation (An installer program) can only call C-style dll's (Technically it can call COM registered C# dll's, but only through J-script or Vbscript which I don't want to do) Since our validation code is in C#, I created 2 dll's in the same project. One In C++ which has our exported function to validate key codes and the other with our C# code. The c++ project adds the C# project as a ref and using managed C++ it calls the C# function. Basically my call looks like this: (AllMax being the namespace) AllMax::AllMaxLicense::KeyCodeValidate(); Both projects compile to dll's and Wise calls the function from the C++ dll which in turn calls using managed C++ to the C# dll. Now since my C# dll is added as a project ref in the C++ project and depends on it, does this mean it can cross-call as long as both dll's are in the same folder? Basically, can I assume that if they are both in the same folder, that calling the exported C++ function will call the C# function? Wise crashes every time we call the C++ function with a generic can not find library error. But if we take out all managed C++ or C# calls, it works fine. Any thoughts? If I need to provide more info let me know.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement