DatRid
DatRid

Reputation: 1169

Use a in FoxPro written DLL in a C# windows-forms-application

I have a single-threaded COM DLL built and written in VisualFoxPro and I'd like to use the procedures from the dll in a C# win-forms-application.

Now it ain't a problem to add a reference to the DLL, but if I want to use the DLL like I usually do it by

using System;

etc, the newly referenced DLL won't show up.

Is there a possibility to properly reference or include a VFP-written DLL?

And to call the procedures from it then?

Or do I need to import the DLL from my project, reference it from there and do I need to change something in my VS then?

Sadly my research didn't bring any results, only the reverse way, which doesn't help me.

Upvotes: 1

Views: 2033

Answers (2)

DRapp
DRapp

Reputation: 48139

Going back a few years, and from what I remember, if the reference is good, you need to create an INSTANCE of the object that was made as OlePublic in your VFP compiled dll. Then, from that object instance you should be able to access and call your exposed functions and procedures. Try that first and I will try to see what I can dig-up.

Upvotes: 2

Nino
Nino

Reputation: 7095

You cannot use such library as managed code but you can use unmanaged code with nteroperability.

First, read about some interoperability basics, then take a look at some of examples of using FoxPro libraries

Upvotes: 3

Related Questions