Jump to content
Sign in to follow this  
PascalBertrand

NetCom7 and Android

Recommended Posts

Has anyone succeeded compiled Netcom7 for android platform. I have a error in nclines.pas :  unsatisfied forward or external declaration ?

If y choose win32 platform, i have no problem.

 

Capture d'écran 2024-05-06 140409.png

Share this post


Link to post
5 hours ago, PascalBertrand said:

Has anyone succeeded compiled Netcom7 for android platform. I have a error in nclines.pas : unsatisfied forward or external declaration ?

Moving the procedure TConnectThread.ProcessEvent code out of the MSWINDOWS conditional define (e.g. move it to above the line {$IFDEF MSWINDOWS}) makes that unit compile. I had to also add System.Types to the implementation clause, for the DWord type.

Share this post


Link to post

Hi Dave,

Thank you for your help. I can compile for android.

Y use TncClientSource and apparently the OnHandleCommand do nothing on Android (y receive no data) but work on win32. Do you have a idea ?

Share this post


Link to post

I have found the problem. It is unicode in TBytes. For Android use WideStingOf() and WideBytesOf instead StrinsOf() and BytesOf().

Share this post


Link to post
12 hours ago, PascalBertrand said:

I have found the problem. It is unicode in TBytes. For Android use WideStingOf() and WideBytesOf instead StrinsOf() and BytesOf().

I would suggest not to use those second layer functions at all, but to use TEncoding for this task:
 

Result := TEncoding.Default.GetBytes(Val);

It seems that all relevant of those overloaded functions use the same TEnconding function internally and the rest of the overloaded functions are only for some special cases.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×