Last post Feb 19, 2014 09:43 PM by Fuxiang Zhang - MSFT
Feb 17, 2014 08:07 PM|WindTalker|LINK
There is a Dll wrote by C++, I'm trying to load this library with LoadLibraryEx.
Code likes following:
IntPtr prt = LoadLibraryEx(strDLLFile, IntPtr.Zero, LOAD_WITH_ALTERED_SEARCH_PATH);
LoadLibraryEx return 0 in release mode, but it works in Debug mode.....
Please help me to resolve it!!!~
Feb 18, 2014 04:05 AM|Altaf_Ksa|LINK
Your C++ DLL is build in Release mode, while building the dll make it as Debug mode and test it again.
Feb 19, 2014 09:43 PM|Fuxiang Zhang - MSFT|LINK
Thank you post the issue to asp.net forum.
In my mind, if the C++ dll configure is the debug mode, we can load it and compile it with debug mode.
Similar, if the C++ dll configure is the release mode, we can load it and compile it with release mode.
As for your issue, your code works in the debug model, that means your c++ dll is debug mode.
If you want to use it in the release mode, please try to set the c++ as release mode.
Below is a similar issue, please check it.
Besides, there is a special forum in msdn for c++. If any relative issue, please post it to currect forum.
Hope this helps, thanks.