Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can VFPr.dll be used in 'C'
Message
De
04/05/2011 14:07:15
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01509265
Message ID:
01509453
Vues:
101
I did something similar before coming upon foxpro/Dos with special libraries.
AFAIK sequitur/codebase is still around, Apollo was sold for a while from the makers of VistaDB.

The most stable API I guess is available from Advantage - even with Dotnet and Webservice access,
eliminating some dbf-barriers of vfp and giving you the option of real dbf-server.
If you plan on a larger app, this would be my first try, as they actively develop still.
They do suppport TP, pretty sure of C as well ;-)
The licensing policy makes sense and can be similar to vfp if you use only their embedded client,
unless TS is planned - there they want you to go real dbf-server. Makes sense, unless you already
went TS and spent the money ;-)

I am not totally sure whether you can access all of vfp*dll's without vfp loaded -
I guess some buffers need to be set up first - but that was soooo long ago.

But you could certainly link your C main as fll and call that from a "pure" vfp 2 liner:

set library to....
= YourMainCAsFll()

There used to be a with some C example code in memo fields - search for the API dir in vfp.

HTH

thomas



>All I need to be able to do is use the VFP API from within C. Since I am not adding functionality to VFP I do not need an FLL. I am using VFP functionality from within another application. I have toyed with the idea of using COM but I was not quite able to make all of it work so I thought it might be simpler just to call functions that reside in the VFP runtime dll. In VFP you can use the Declare statement to access such things as the Windows API so I thought perhaps I could reverse the process and access the VFP runtime from outside.
>
>Simon
>
>>It notifies the vfp runtime of all the functions that can be called from within vfp, including parameters and return type.
>>If you have some helper funcs used only internally in C you don't need to add them into those structures.
>>Think of it as a vTable in COM terms.
>>
>>>It appears the 3rd link is what I want. I just need to understand why the following is needed.
>>>
>>>
>>>FoxInfo myFoxInfo[] = {
>>>   {"DBAPPEND", (FPFI) Example, 1, "I"},
>>>};
>>>FoxTable _FoxTable = {
>>>   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
>>>};
>>>
>>>
>>>
>>>Thanks,
>>>Simon
>>>
>>>
>>>>This is a good place to start -- Accessing the Visual FoxPro API
>>>>http://msdn.microsoft.com/en-us/library/s2bceth7(v=vs.80).aspx
>>>>
>>>>On that page -- How to: Add Visual FoxPro API Calls
>>>>http://msdn.microsoft.com/en-us/library/9aw3xtcz(v=vs.80).aspx
>>>>
>>>>API Library Routines A-Z -- shows exactly what can be done and how
>>>>http://msdn.microsoft.com/en-us/library/5x36hyx5(v=VS.80).aspx
>>>>
>>>>FLL project quick start
>>>>http://fox.wikis.com/wc.dll?Wiki~CreatingEmptyFLLProjectFromTemplate
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform