When registered properly, the runtime files (VFP?R.DLL/VFP?T.DLL) give you the ability to create instances of the Visual FoxPro Application object. Try the following:
set oVFP = CreateObject("VisualFoxPro.Application")
iNo = oVFP.DoCmd("use blah")
To register the runtime file, use RegSvr32.
HTH.
>Re-trying some ideas from another thread, I am still unable to do the following from VBScript (Win2K, WSH5.6):
>
>
> Set oVFP = CreateObject("VisualFoxpro.Runtime.7")
> iNo = oVFP.DoCmd("use blah")
>
>
>Saving it to vfpcall.vbs and running it gives me this:
>
C:\wintemp\vfpcall.vbs(4, 2) Microsoft VBScript runtime error: Object required: 'oVFP'
>
>I then tried to put it inside of a COM+ Server Package, thinking I might get something that way. Nope.
>
>Can anyone recommend a way that I could call the runtime? On a side note, when I went to the MS .NET launch a presenter mentioned that the CLR can be instanced and called for fun stuff, it'd be great to see how to do that in VFP too.
>
>Thanks.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao