Question for the SO community. I have a C++ library with full source code and I am able to compile it in 32- and 64-bit mode. However, to call the code from .NET, I must choose either 32- or 64-bit, therefore forcing my application to be either 32- or 64-bit. I decided that I may have to live with that problem... but I stumbled across something that gives me hope. I noticed that I can reference "kernel32.dll" in an extern function and the program runs just fine in both 32- and 64-bit. Does anyone know how this is done?
Thanks!
It's a feature of Windows on Windows 64 (WOW64): the File System Redirector
You can't really use it for your own libraries, because it's only for the System32 folder. (Do NOT even think about putting your DLLs in System32.)
Using SetDllDirectory might help, but I'm not sure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With