using dlls

new topic     » topic index » view thread      » older message » newer message

Hi all !
	I=B4m just starting using external dlls and need some help.

The dll is dxsoftex.dll  (from <http://www.dxsoft.com/dxs-exch.zip> )and=
=20
the functions are these:

--int DxsoftExchangeInit(int canal_number);
--int DxsoftGetSymFromRxBuffer(void);
--int DxsoftPutSymToTxBuffer(char sym);
--int DxsoftGetSymFromTxBuffer(void);
--int DxsoftPutSymToRxBuffer(char sym);

the code:

include win32lib.ew
atom ad
integer a1,b1,c1,d1,e1,a

ad =3D open_dll("dxsoftex.dll")
puts(1,sprint(ad)&"\n")    ------ ad gives 9895936

a1 =3D define_c_func(ad,"DxsoftExchangeInit", {C_INT}, C_INT)
puts(1, sprint(a1)&"\n")
b1 =3D define_c_func(ad,"DxsoftGetSymFromRxBuffer",{C_CHAR}, C_INT)
puts(1, sprint(b1)&"\n")
c1 =3D define_c_func(ad,"DxsoftPutSymToTxBuffer",{C_CHAR}, C_INT)
puts(1, sprint(c1)&"\n")
d1 =3D define_c_func(ad,"DxsoftGetSymFromTxBuffer(void)",{C_CHAR}, C_INT)
puts(1, sprint(d1)&"\n")
e1 =3D define_c_func(ad,"DxsoftPutSymToRxBuffer(char sym)",{C_CHAR}, C_INT)=

puts(1, sprint(e1)&"\n")


I stopped here because a1..e1 gives every time only the value -1
which means that these functions "could not be found".
What am I doing wrong ?

Thanks

Rubens

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu