Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call VFP dll from C#
Message
 
To
04/05/2004 10:39:34
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00900733
Message ID:
00900855
Views:
8
Hey Mark,
Very simple. Without wading thru some tome on the subject, here's an example:
< % @Page Language="C#" ASPCompat="true" %>
< % @Import Namespace="avfpdemo2_dotnetproxy" %>
< %
server x ;
x = new server() ;
try
   {
	Response.Write(x.main());
   }
catch(Exception ex)
   {
       	Response.Write("Caught .NET exception, source: " + ex.Source + " message: " + ex.Message);  
   }

%>
Compile your vfp mtdll and then run tlbimp over it (alternatively, there is some simple setting in vs.net that generates the dll proxy that is called). So, in the above, the proxy dll is declared (which is basically the vfp mtdll), the "server" object is created from the VFP "server" class, and finally the "main" method of the vfp mtdll is called...
>If I create a VFP DLL how can I use it from C# code?
>
>Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform