Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A very small example ~COM DLL
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00275128
Message ID:
00275145
Views:
26
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform