Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call VFP .exe and library from C#
Message
General information
Forum:
ASP.NET
Category:
Visual FoxPro Toolkit for .NET
Miscellaneous
Thread ID:
00772152
Message ID:
00773842
Views:
6
Jennifer,

You would need to create a COM object(s) with your application and then call these classes within .NET.

>Thanks for your input! I had previously used System.Diagnostics.Process() to call a VB exe app. and it worked well.
>
>But, in this case, I am trying to execute VFP app #1 that is currently called from VFP app #2.
>#2 sets a ClassLib first, and then calls #1 with 2 parameters.
>#2 can save property values from #1.
>
>Any ideas on how I can set the VFP Classlib from .Net?
>
>Here's the code in #2 calling app:
>
>
>SET CLASSLIB TO &lcLib IN BookOut.EXE ADDITIVE
>>
>>loBookOut = CREATEOBJECT(lcLib)
>>
>>IF TYPE("loBookOut") = "O"
>>
>> WITH loBookOut
>>
>> .iAccountid = vp_AccountID
>>
>> .cRegion = "Texas"
>>
>> DO BookOut.exe WITH loBookOut
>>
>> IF .lSaveSelected = .T.
>>
>> SELECT rv_AutoM
>>
>> REPLACE rv_AutoM.cVIN WITH .cVIN,;
>>
>> rv_AutoM.nYear WITH .iYear,;
>> rv_AutoM.cMake WITH .cMake,;
>> rv_AutoM.cModel WITH .cSeries,;
>> rv_AutoM.nMileage WITH .iMileage,;
>> rv_AutoM.nBookOutValue WITH .iAdjustedTrade,;
>> rv_AutoM.nInitialBookOutValue WITH .iAdjustedTrade
>>
>> TABLEUPDATE(.T.)
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform