function getdlsymaddress(lib,n); //获取动态库中的函数句柄 begin if not(ifstring(lib) and lib and n and ifstring(n)) then return 0; {$ifdef linux} pso := dlopen(lib,0x101); //if pso then Return dlsym(pso ,n); return 0; {$endif} Return GetProcAddress(LoadLibraryA(lib),n); end function dlopen(dl:string;flg:integer):pointer;cdecl ;external "libdl.so.2"; function dlsym(handle:pointer;symbol:string):pointer;cdecl ;external "libdl.so.2"; function LoadLibraryA(txt:string):POINTER;stdcall;external "Kernel32.dll" name "LoadLibraryA"; function GetProcAddress(h:pointer;n:string):pointer;stdcall;external "Kernel32.dll" name "GetProcAddress";