Information générale
Catégorie:
Codage, syntaxe et commandes
Jim,
Making DLLs in VFP is not a big deal.
Just build a dummy project with a Class , or a program which defines a class . and build it as a DLL, instead of EXE, or APP.
Note that in the class Definition , you must give the syntax OLE PUBLIC.
eg :
DEFINE CLASS vfield_class AS CUSTOM OLEPUBLIC
** defining a class on base class custom as OLEPUBLIC
PROCEDURE insfld
PARAMETER myname
messagebox("You have a nice name"+myname)
ENDPROC
ENDDEFINE
**********************
Now put the above code into a PRG and create a dummy project , include above PRG , and set it as main. Now build it to DLL.
You can use that as DLL now onwards.
If you want to call the procedure from VFP,
use the following syntax,
DECLARE insfld IN LIB "path of DLL" (param)
insfld("XXXX")
***********
This will work.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement