AnsweredAssumed Answered

vrf Pass variable by reference

Question asked by VRFuser on Dec 13, 2004
Hi All,

I need to use and dll, which allow me to write and read values to and
from an application using shared memory.

I have been able to write the values, becuase the variables I pass dont
need to be changed. But when I try to read, I have to pass a variable
that has to be "filled", and I haven't been able to do that.

The documentations says that for Delphi the header should be this:
(no is the memory index, valor is the value to be written or read)

procedure write_reg (no,valor:integer):
stdcall; external regist.dll;

procedure read_reg (no:integer; var valor: integer);
stdcall; external regist.dll;

procedure write_reg_ana(no:integer;valor:single):
stdcall; external regist.dll;

procedure read_reg_ana(no:integer;var valor:single):
stdcall; external regist.dll;

procedure write_reg_str(no:integer;valor:pchar):
stdcall; external regist.dll;

procedure read_reg_str(no:integer;var valor:pchar):
stdcall; external regist.dll;

My problem is with read_reg, read_reg_ana and also with both string
functions.

I have been using:
long __stdcall write_reg(long no, long valor); //(integers)
long __stdcall write_reg_ana(long no, float valor);//(floating point,
32 bits, have not been able to use float64)
long __stdcall write_reg_str(long no, char* valor); //(strings)
long __stdcall read_reg(long no, long  *valor);
long __stdcall read_reg_ana(long no, float *valor);
long __stdcall read_reg_str(long no, char* valor);

Thankz in advance,
Nelson

---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes