Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Building a DLL
Message
 
 
À
29/11/2000 10:05:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00446712
Message ID:
00446733
Vues:
7
>Hi All,
>
>Hope this isn't a stupid question. In the project manager, under Build, there is an option to build EXE, APP, or DLL. Can I build a DLL/FLL that I can use a SET LIBRARY TO with to share between separate EXEs in Foxpro and not have to use C or C++?
>
>I have a proc file that I use like a DLL - and a bunch of different smaller applications use it and have it compiled into their exe.
>
>It would be nice if I could just make a DLL and share it between these different executables. Is this impossible?
>
>thank you

No you can't build a library DLL with VFP. The languages I know of that do this are VC++ and Delphi (there are probably others). VFP (and VB) can only build COM DLLs.

What you can do is put a DEFINE CLASS MyFunctionLibrary as Custom OLEPUBLIC at the top of your procedure file and a ENDDEFINE at the end. Add it to a project and compile it into a DLL called something like MyDLL (whatever). Then you can just access your functions with a:

ox = createobject("MyDLL.MyFunctionLibrary")
x = ox.Function1()
y = ox.Function2()
etc.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform