*** initializes communication
##VAR eaf_setup={}, eaf_str='', eaf_res=0, eaf_msg='', eaf_dllfile='', eaf_dlltype=0, eaf_dll=0, eaf_file='', eaf_res='', eaf_mpath=''
##VAR eaf_dir='', eaf_templ='', eaf_errnr=0, eaf_retstr='', eaf_showerror=.t., eaf_arr={}, eaf_a='', eaf_e='', eaf_sign='', eaf_qr=''
##VAR eaf_arr1={}, eaf_dlldate=date(), eaf_dlltime='', eaf_dlldt=date(), eaf_dlltm=''

eaf_mpath:="..\..\ca_fem\connect_libs\Pegasus_C_A_100\"
eaf_dir:=curdrv() + ':\' + curdir() + '\'
eaf_str:=memoread('..\..\localdata\eafdss\setup.dbx')
eaf_dllfile:=eaf_mpath + 'DocMsign.DLL'
eaf_dlltype:=8 
***last dll date - time
eaf_dlldt:=ctod('30/09/2020')
eaf_dlltm:='13:46:19'

***eaf_setup:={type, com/IP, signs dir, backup dir, Actv.Key, Upload Pswd, Upload link, sign titles}
eaf_setup:=CrStrArray(eaf_str +  repl(';', 20), ';')
eaf_setup[1]:=val(eaf_setup[1])
if(empty(eaf_setup[1]), eaf_setup[1]:=1, )
eaf_setup[8]:=val(eaf_setup[8])=1
eaf_setup[9]:=val(eaf_setup[9])=1
eaf_setup[10]:=val(eaf_setup[10])=1
if(empty(eaf_setup[11]), eaf_setup[11]:='1', )
eaf_setup[11]:=val(eaf_setup[11])=1
eaf_setup[12]:=val(eaf_setup[12])
eaf_setup[13]:=pegtrim(eaf_setup[13])
if(empty(eaf_setup[13]), eaf_setup[13]:='https://www1.gsis.gr/tameiakes/myweb/q1.php', '')
eaf_setup[14]:=pegtrim(eaf_setup[14])
if(empty(eaf_setup[14]), eaf_setup[14]:='80', )
eaf_setup[15]:=pegtrim(eaf_setup[15])
eaf_setup[16]:=val(eaf_setup[16])=1
eaf_setup[17]:=pegtrim(eaf_setup[17])

##RETURN