Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-01-10
3
Medium Priority
?
353 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 43

Assisted Solution

by:pcelba
pcelba earned 1000 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 30

Accepted Solution

by:
Olaf Doschke earned 1000 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 43

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

824 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