Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Foxpro DLL in Visual Basic
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00936202
Message ID:
00936863
Views:
30
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
Map
View

Click here to load this message in the networking platform