Information générale
Catégorie:
COM/DCOM et OLE Automation
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement