Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A very small example ~COM DLL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00275128
Message ID:
00275145
Vues:
27
>Anyone have a very small example of a COM DLL written in VFP. Say one that could say open/close a table and return the contents of the first field. Just enough to start experimenting with VFP's COM capabilities.
>
>AdvThanksance

Your main program in your proj (mycom)...

DEFINE CLASS mycom AS custom OLEPUBLIC

PROCEDURE openfilereturnfieldone
USE \\myserver\mytable.dbf
lcText = mytable.fieldone
RETURN lcText
ENDPROC

ENDDEFINE

Build a dll, register it(regsvr32), and then...

In VFP,
ox=crea('mycom.mycom')

?ox.openfilereturnfieldone()


In an ASP

<%
oVfpObj = server.createobject("mycom.mycom")
Response.write(oVfpObj.openfilereturnfieldone())
%>



HTH
Wayne
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform