General information
Category:
Windows API functions
Tanks a lot for the informations, i works great now, you structure class is the best thing since sliced bread. It is great.
I also found the problem to my BYTE type variable with your CONVERT.FLL. Here is how my Fuction call and declare look like now, it works nice.
** -TestApi.Prg
DECLARE INTEGER GetStatus IN SomeDll ;
INTEGER Device , STRING @STATUS, ; && Status is a structure
INTEGER @devStatus, INTEGER mode && devStatus Is Byte Type
IF AT("CONVERT.FLL", UPPER(SET('Library'))) = 0
Set Library To Convert.Fll Additive
ENDIF
IF AT('STRUCT.VCX', UPPER(SET('ClassLib'))) = 0
SET ClassLib TO Struct Additive
ENDIF
oStruct = CreateObject('LStatus')
lnDevStatus = 0
lcStruct = oStruct.GetString()
lnRc = GetStatus(lnDevice, @lcStruct, @lnDevStatus, L_WAIT)
oStruct.SetString( m.lcStruct )
*-- Convert the byte type to Numeric using CONVERT.FLL
lnDevStatus = VAL(FLL_ByteToChar(lnDevStatus))
oStruct.Pstatus = VAL(FLL_ByteToChar(oStruct.Pstatus))
DEFINE CLASS LStatus AS STRUCT
DStatus = 0
DCode = 0
PStatus = 0
cMembers = "l:DStatus,l:DCode,b:PStatus"
ENDDEFINE
*--- End
CHEERS.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only