问题
Is it possible to use an unmanaged DLL (C++) in an Apache Cordova project? How?
I tried to follow the instructions on this page but I didn't understand where do I reference the DLL and its methods.
UPDATE
It seems to be possible creating a Windows Runtime Component that references the unmanaged DLL and Cordova plugin pointing to the winmd file, however it seems that the method call is not working. I don't receive any error message and can't even debug as Visual Studio still does not have debugging capability for Apache Cordova projects.
回答1:
The next version of the Cordova Command Line Interface will improve support for multiple chip architectures when using a C++ based Windows Runtime component in a Cordova plugin.
You can see details here: https://github.com/apache/cordova-lib/pull/164
We are also working to ensure that the Visual Studio debugger is able to attach to Windows Phone (which is what I assume you are referring to above) when using the Windows Phone (Universal) platform target for Phone 8.1. Windows 8.0/8.1 debugging is already supported. In the mean time, you can open up the solution in the bld/Debug/platforms/windows after building for Windows as a tactical workaround. Stay tuned for an update in the coming weeks.
来源:https://stackoverflow.com/questions/28620082/use-an-unmanaged-dll-in-apache-cordova-project