Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible to Call External Program from VFP MTDLL?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Divers
Thread ID:
01138193
Message ID:
01138674
Vues:
14
Yep, it's been a good learning experience. Here's a quick and dirty example.


*--Main Class
DEFINE CLASS myclass AS session OLEPUBLIC

PROCEDURE MaxOutCPU AS VOID
*--Count to Half a billion.
lnStart = SECONDS()
FOR i = 1 TO 500000000
NEXT i
=STRTOFILE("Process Took: " + TRANSFORM(SECONDS() - lnStart) + " seconds" + CHR(13) + CHR(10), "C:\FoxStats.txt",1)
ENDPROC

PROCEDURE CallExternal(cExternal as String) &&--Must contain UNC path and file name.
DO (cExternal)
=STRTOFILE("Ran external Func: " + TRANSFORM(DATETIME()) + CHR(13) + CHR(10), "C:\FoxStats.txt",1)
ENDPROC

ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform