Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Foxpro DLL in Visual Basic
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00936202
Message ID:
00936863
Vues:
29
Hi Kevin,

Thanks a lot for the tips. Please see the VB codes below, I get the "Object variable or With block variable not set" error message when run:

The VFP dll
DEFINE CLASS mydll AS CUSTOM OLEPUBLIC

FUNCTION hithere
LPARAMETERS tcName as string

IF NOT EMPTY( tcName)
lcString = "Hi there "+tcName
ELSE
lcString = "Hi there Unknown"
ENDIF
RETURN lcString

ENDDEFINE

The VB codes

Private Sub command1_click()
Dim oDLL As mydll.mydll
Dim sString As String

sString = oDLL.hithere("John")
text1.text = sString
End Sub


Do you see any problem here?

KY
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform