Original address: Http://zhidao.baidu.com/link?url=fzqefMM44ljXA5BnAbkX44SapCUteyzlXFvGLKvukBivm9AB-w39P_ H7ex1ty-gqx8j3a03azbpat6ymqjey4sc5jlaaymrvoigzcelm_ky
So nature is a dynamic link library
Compiling with GCC will generate
In Delphi XE
if notTfile.exists (tpath.getdocumentspath+'/libserial_port.so') Then beginShowMessage (Tpath.getdocumentspath+'/libserial_port.so not found'); End; Handle1:=loadlibrary (Pchar (tpath.getdocumentspath+'/libserial_port.so'));//Dynamic Loading StorageifHandle1<>0 Then //Find Librarybeginfun1:=getprocaddress (Handle1,'Openport');//Search for library functions add, and return function pointersifAssigned (FUN1) Then begin......
As for the above Getdocumentspath or other directories can also refer to Tpath instructions and so file storage directory has a relationship
Another notable thing to pass in the string xe is the double-byte.
Delphi calls Android's. so file (GO)