we use a self-written 32-bit C ++ DLL from our C # applications. Now we noticed that when C # applications run on a 64-bit system, the 64-bit runtime is automatically used, and, of course, the 32-bit DLL cannot be accessed from the 64-bit version.
My question is: is there a way to use a 32 bit DLL? If not, if I created a 64-bit version of the DLL, would it be easy to let the application choose which one is P / Invoke?
I am going to create two helper classes in C #: one that imports functions from a 32-bit DLL and imports from a 64-bit DLL, and then creates a wrapper class with one function for each imported function that calls either the 32-bit importer or 64-bit importer, depending on the "bitty" OS. Will this work?
Or is there another easy way to do something?
source
share