Can a C# DLL call C++/CLI managed wrapper which calls native C++ static library? -
Can a C# DLL call C++/CLI managed wrapper which calls native C++ static library? -
i have dll exception encountering:
response threw exception: not load file or assembly or 1 of dependencies. effort made load programme wrong format.
i have source code next dll/library combinations. trying figure if have unusual combination or need check ensure runs. have native c++ code in static library called managed c++ clr supported dll. seems work fine until next point.
i created test c# exe console application phone call managed c++ clr supported dll. works expected. difference exception thrown when there c# class library calling same managed c++ clr supported dll. supported @ or reason why exception gets thrown? if combination incorrect, there workaround c# class dll phone call managed c++ clr supported dll.
everything created windows 7 64 bit visual studio 2012. projects in release mode x64 bit platform selected.
in every case i've seen, 32-bit c# app trying load 64-bit c++ or c++/cli dll or 64-bit c# app trying load 32-bit c++ or c++/cli dll.
the next step take utilize dependency walker load c++/cli dll. dependency walker show dlls dll trying load. in cases i've had 32-bit dll same name 64-bit dll appear in path first, hence tries load wrong dll.
note dependency walker show 64 on icon next 64-bit dlls , show message along lines of: "error: modules different cpu types found." in info box @ bottom
c# c++ dll
Comments
Post a Comment