I’ve done a C++ dll with a function which takes unicode strings (LPCWSTR type):
extern "C" __declspec( dllexport ) HRESULT signFile(LPCWSTR fileName, LPCWSTR certSubject, LPCWSTR storeName);
HRESULT signFile(LPCWSTR fileName, LPCWSTR certSubject, LPCWSTR storeName)
A colleague of mine is trying to call this through JNA
Using String as parameter failed (the C++ function is called, but the parameters are void)
Using WString also failed.
Unfortunately, JNA mappings don’t refer to LPCWSTR type.
Any idea on this?
The JNI equivalent of
LPCWSTRandLPWSTRisWString.Java Strings map to
char*orLPSTRorLPCSTR, but I believe will be UTF-8 endcoded, so can still pass the full character set.