Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a function with foxtools.fll
Message
From
09/06/1998 14:30:12
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Calling a function with foxtools.fll
Miscellaneous
Thread ID:
00106418
Message ID:
00106418
Views:
67
Hi all!
I have a question.

Im acessing a 16bit .dll file to read values from a PLC and have some problems the code is like this:


SET UDFPARMS TO value

SET DEFAULT TO C:\dbf\testapi
IF !"FOXTOOLS" $ SET("library")
SET LIBRARY TO (SYS(2004)+"FOXTOOLS")
lLoaded = .T.
ENDIF

perstr=''

Portpa = RegFn("PCDSetParameter","III","I","c:windows\system\promosvb.dll")
Porton = RegFn("PCDOpen","","I","c:\windows\system\promosvb.dll")
Stasjon= RegFn("PCDSetStation","I","","c\windows\system\promosvb.dll")
LesR=
RegFn("PCDReadRegister","IIC","I","c\windows\system\promosvb.dll")

per= CallFn(Portpa,1,19200,1)
per1=CallFn(Porton)
per3=CallFn(Stasjon,1)
per2=CallFn(LesR,500,1,perstr)

The PCDreadregister have the following parameters
integer adress =start adress off register in PLC
integer count =number off registers to read
long value =array with return values

I dont know how to return a valid value I have tried with
@ in "PCDReadRegister","II@C"

I have tried with @perstr then I got an error:
Param 2 wrong got R expected C??


If you know please help

Best regards

Per Simmersholm
Next
Reply
Map
View

Click here to load this message in the networking platform