Hi Stephane,
>DECLARE INTEGER GetStatus IN SomeDll ;
> INTEGER Device , STRING @STATUS, ; && Status is a structure
> INTEGER @devStatus, INTEGER mode && devStatus Is Byte Type
>*-- Convert the byte type to Numeric using CONVERT.FLL
>lnDevStatus = VAL(FLL_ByteToChar(lnDevStatus))
>oStruct.Pstatus = VAL(FLL_ByteToChar(oStruct.Pstatus))
If devStatus is a byte type passed by reference, the easiest way is to pass it as a string. You can use ASC(lcDevStatus) to convert it into a numeric value after calling the API function. And you shouldn't have to call the conversion routine fpr PStatus. Since you declared it as a byte, the struct class does all the conversion for you. The only thing that might be neccessary is to declare it as "ub:", an unsigned byte.
Christof
--
Christof