Re: How can I pass an atom to a C function as C float or double

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

I really don't know what is the problem
with my email program ...=20
Sory for all that "=3D20 ... ".

Also, the message I send have some line
deleted.=20
I write here again :

-------------------------------------------------
I ALSO FOUND MYSELF A SOLUTION TO MY=20
PROBLEM :

EXAMPLE :
// C function in dll remain the same :
void MyFunction(float ParameterA);

-- but in euphoria I define the function like this :
constant xMyFunction =3D define_c_proc(mydll, "MyFunction", {C_INT})

-- then in the procedure I did the magic thing :
procedure MyFunction(atom ParameterA)

ParameterA =3D bytes_to_int(atom_to_float32(ParameterA))

c_proc(xMyFunction, ParameterA)

end procedure

Please tell me what you think about this ...
I did some tests and it work. The problem is that is slow.

Sorry again.
Diana Nistor


=0D
=0D
Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate varian=
tele lor.=0D
Va rugam sa luati in considerare ca exista un risc de fiecare data cand des=
chideti=0D
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudici=
u cauzat=0D
de virusi.=0D
=0D
Disclaimer: RAV AntiVirus may not be able to detect all new viruses and var=
iants.=0D
Please be aware that there is a risk involved whenever opening e-mail attac=
hments=0D
to your computer and that MobiFon is not responsible for any damages caused=
 by=0D
viruses.=0D

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

Search



Quick Links

User menu

Not signed in.

Misc Menu