Solved

Need a foxpro created dll be read by a program that requires BorlandC compiled dlls

Posted on 2013-01-10
3
338 Views
Last Modified: 2013-08-08
I have heard that there is a way to do this, any help would be appreciated.

I need to be able to use and maintain a dll that is coded in visual FoxPro to be understood by another program that can only understand a VisualC or BorlandC compiled dll. I have heard that a wrapper can be created to accomplish this.

Steps to do this would be a big help if anyone knows how.

Thanks again!

BC
0
Comment
Question by:busycoder
  • 2
3 Comments
 
LVL 42

Assisted Solution

by:pcelba
pcelba earned 250 total points
ID: 38765066
You may create COM DLLs in FoxPro and call them from .NET or other programs understanding COM interface. Some examples are here: http://www.vfpconversion.com/article.aspx?quickid=030034 

Another option is a FLL library which is FoxPro API DLL written in C which you may call from FoxPro only... Not suitable for this case.

So you'll need to find a C programmer which is able to write a standard DLL with a defined set of entry points and which you may call from C (or even from FoxPro and other languages after appropriate declarations) and which will call given COM DLLs created in FoxPro... A lot of work.

You may start here: http://en.wikipedia.org/wiki/Dynamic-link_library
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682592(v=vs.85).aspx
http://www.icynorth.com/development/createdlltutorial.html

And how to call COM DLL from C is described e.g. here: http://www.experts-exchange.com/Programming/Languages/CPP/Q_10255178.html

It is probably better to ask this question in C forums.
0
 
LVL 29

Accepted Solution

by:
Olaf Doschke earned 250 total points
ID: 38765205
The question rather is, why should this be a foxpro DLL? Do you need to access DBFs? I anything else Foxpro specific in the focus of this DLL?

If not Foxpro has nothing to do with it.

What is the programming language, that would use this DLL?

Ways to access VFP data from non VFP applilcations could also be:
1. VFP ODBC driver (needs ODBC capability, for old DBFs up to VFP6 features)
2. VFP OLEDB Provider (needs OLE/COM capabilities, can access any VFP DBF)
3. Put data access to a service, you either create by using VFP, creating a COM DLL and publishing it to an IIS via the Soap Toolkit or programm something via ActiveVFP putting data into XML or JSON or some other format you can make use of in any application/language needing your data.

I would recommend them in that order. No need to go for a VFP created DLL in tzhe first, if data is your goal, this rather is a last resort. It can indeed help to get more than just the data and to reuse some of the VFP code and logic you have to process data. If that is needed a web service may be a solution for internet or intranet, but it's an overhead for a single user desktop application.

Bye, Olaf.
0
 
LVL 42

Expert Comment

by:pcelba
ID: 38766211
Yes, VFP ODBC and OLE DB is mentioned in the first link above. It should also be possible to call VFP stored procedure from any language.

BUT possible solutions are reduced to "program that can only understand a VisualC or BorlandC compiled dll"... Of course, it does not mean the third way is not achievable.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Building a cohesive image for your brand is vital to making an impression on consumers. When the economy is tough, brands do better than unbranded  products. This can have a huge impact on your long-term profits, as the economy goes up and down.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question