Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible to Call External Program from VFP MTDLL?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01138193
Message ID:
01138689
Views:
16
Thank you!
>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
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform