[Migrated content. Thread originally posted on 13 September 2005]
An OCX-control has the following Method declared in the def-file :
* PreTare
METHOD, 18, @PreTare,
"double" @NewTareValue, TYPE 5,
"unsigned char" @NewTareUnit, TYPE 17,
"short*" @ScaleStatus, TYPE 16386
RETURNING "boolean", TYPE 11
Working-Storage :
77 SA-BOOLEAN PIC S9.
77 WTARRA PIC ---,-.
77 SA-NEWTAREVALUE USAGE IS DOUBLE.
77 SA-NEWTAREUNIT PIC X.
77 SA-SCALESTATUS PIC S9(4) USAGE IS COMP-5.
Procedure :
SET-TARRA-CLICK.
PERFORM TARRA00 THRU TARRA99.
TARRA00.
MOVE WTARRA TO SA-NEWTAREVALUE.
MOVE 2 TO SA-NEWTAREUNIT.
MODIFY WEEGSCHAAL, @PreTare(
BY NAME NewTareValue SA-NEWTAREVALUE
BY NAME NewTareUnit SA-NEWTAREUNIT
BY NAME ScaleStatus SA-SCALESTATUS)
RETURNING SA-BOOLEAN.
TARRA99.
WTARRA has a value of 16,5
SA-SCALESTATUS returns a value, determining a certain status like PreTare not performed.
Executing this procedure, the control gives an error.
Any ideas ?



