General information
Category:
COM/DCOM and 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
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