Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making VFP DLL functions visible.
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00236819
Message ID:
00236917
Views:
9
>I have written a couple of test DLLs in VFP and they work if I call them from VFP. However, I want to call them from C, Delphi, and VB but the 'entry point' is missing. When I write DLLs in C, I have to declare functions as WINAPI - is there anything similar in VFP?
>

When you compile a DLL in VFP, it doesn't contain a C-API interface... it is a COM object with an IDispatch interface. You use the COM object in VB simmilar to how you would call it from VFP.

First, you have to add a reference to the VFP COM object in your VB project... then in code you do something to... (don't hold me to this, I don't use VFP to much.) ...instantiate and get a reference to the COM Object.

Dim oX as Object
Set oX = CreateObject('MyDLLName.MyClassName')

Once you have that reference you can call PUBLIC methods and properties as you would and class in VFP or VB...

oX.DoMyClassMethodOne()

HTH,
BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform