Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a DLL from VFP for C#
Message
 
To
27/05/2012 06:38:49
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Miscellaneous
Thread ID:
01544521
Message ID:
01544533
Views:
96
Hi Canh,

You can create .NET COM components that let you call C# code from FoxPro. It requires that you compile your .NET components with the COM Interop flag in the compiler options which enables your components to become COM callable from VFP.

That works, but it requires COM registration (actually .NET COM registration which requires special tools) and you don't have access to .NET components that are not explicitly exported to COM. Most .NET components are not accessible via COM.

There are also ways to bypass COM registration for .NET components by hosting the .NET runtime in FoxPro. This also gives the opportunity to access MOST .NET components from FoxPro including those that are not directly supported via COM Interop.

I wrote about this here:
http://www.west-wind.com/weblog/posts/2007/Jul/01/Hosting-the-NET-Runtime-in-Visual-FoxPro

Or you can look at the West Wind Internet and Client Tools which integrates this functionality directly into a wwDotnetBridge component.

Here's more info on the actual wwDotnetBridge class:
http://www.west-wind.com/webconnection/wwClient_docs/_24n1cfw3a.htm

Hope this helps,

+++ Rick ---

>Hi all
> I want to make a DLL from VFP for user C#.
>I have a class in VFP and I build a DLL with “Single -Thread Com Server” and “Multi -Thread Com Server”. The files DLLs distributed to user C#, but user C# cannot add in project.
>
>Please help me or show me how to do that. Thanks.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform