Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a function with foxtools.fll
Message
De
09/06/1998 14:30:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Calling a function with foxtools.fll
Divers
Thread ID:
00106418
Message ID:
00106418
Vues:
68
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform