Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing a VFP 6 DLL 1

Status
Not open for further replies.

grahamrhind

Technical User
Jul 8, 2003
99
A1
Hello all,

I've created a VFP 6 DLL (COM component). In relation to this I was wondering if:

1) anybody knew, or could point me to, a definitive list of other programming languages which can "address" a VFP 6 DLL
2) whether VFP 9 has more/better options for creating a component/API library which can be addressed by other programs.

Thanks in advance.
 
Hi!

The capability to produce COM+ components was introduced with VFP7, I don't know of other improvements that were made in 8 or 9.

Any language capable of COM/OLE is capable of using a foxpro COM server DLL. So you can use it from .net, Office (VB for Office Applications), even the windows versions of perl/php/python/ruby are capable to create a com server object. So it's rather limitless, but bound to Windows (or Windows emulations).

Bye, Olaf.
 
Graham,

As Olaf says, virtually any language that can act as a client to a COM control can work with VFP DLLs, which are really just standard COM servers.

I've called VFP DLLs from Excel VBA macros, ASP pages and even Crystal Reports, to name but three.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Thanks for the responses.

As VFP is the ONLY programming language I know, I can never answer the questions from users about which other languages can access the DLL. If I tell users that anything that can instantiate a COM component can access it, I get blank looks and wandering attentions. That's why I'm looking to build a list of programming languages which can do that (hence my search for a list) so that I can tell them whether they have the tools to do it rather than having to rely on their knowledge (or mine).

Graham
 
Graham,
The important thing to remember is that there are many types of .DLLs (Dynamic Linked Library). VFP can create only those that are referred to as a COM Server. In the world of Object Orientation, arguably this is the most universally accessible. The host just needs to do CREATEOBJECT() and then they can access all the public Properties and Methods().

Note: The CREATEOBJECT() function syntax may vary slightly in the host "language', but they are all pretty the same concepually.

Rick
 
Graham,

well, to start the list:

C
C++
Java (on windows)
VB
ASP
Access
other Office Products (in Makros)
C++.net
C#.net
VB.net
ASP.net
Perl (on windows)
PHP (on windows)
Python (on windows)
Ruby (on windows)
... (to be continued)

How easy using COM is, depends on the language. In .net to use such an "old" technology as COM there is "COM interop" and you may need to do some preparation. In Java you have to use a Java-COM Bridge.

Indeed COM is more connected to the OS (windows) than to any specific programming language and incorporating the ability to use COM objects in a programming language is merely the support of os functions (OLE), so it's rather seldom, that a language does not support COM. That would be, as if it wouldn't support a Windows GUI.

Bye, Olaf.
 
To add a few more possibilities to Olaf's list:

Delphi
JavaScript (in Windows)
T-SQL (on SQL Server, in extended stored procedures)
Crystal Reports (visible as "special functions")

I'll probably think of some more later.

Mike




__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Well to add to the list, you can include the Office products like:
Excel
Word
Outlook
Project
Visio

These all have a "scripting" capability that can use COM objects.

(I just noticed that Olaf actually touched on this, but I'll make it more explicit!)

Rick
 
Thanks Guys. I'm sounding so much more knowledgeable already!

Graham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top