Wyatt wrote:> You need to use Charset.Ansi for PInvoke calls on Linux/macOS because the> TurboActivate API on those platforms accepts UTF-8 strings not UTF-16> (double-byte character) strings.
HI Wyatt
do you mean when i import so file [DllImport("libTurboActivate.so", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
I get a ProductDetailsException, saying that the TurboActivate.dat is either missing or corrupted.
Can you please let me know which method i have to change to use Charset.Ansi
TurboActivateVersionGuidInit(); => TurboActivate.VersionGUID = sVersionGUID;
TurboActivate.PDetsFromPath("/tmp/TurboActivate.dat"); retrun TA_OK: // successful
After TurboActivate.IsActivated();
public static bool IsActivated() { #if TA_BOTH_DLL switch (IntPtr.Size == 8 ? Native64.IsActivated(VersionGUID) : Native.IsActivated(VersionGUID)) #else switch (Native.IsActivated(VersionGUID)) #endif { case TA_E_GUID: throw new GUIDMismatchException(); case TA_E_PDETS: throw new ProductDetailsException(); it fails here !!!!! case TA_E_COM: throw new COMException(); case TA_E_IN_VM: throw new VirtualMachineException(); case TA_OK: // is activated return true; }
return false; }What I'm doing wrong ?
I\m using Ubuntu 18.04 on windows it was working
Thanks in advance