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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Visual Basic Activex .DLL in VFP 1

Status
Not open for further replies.

Raven123

Programmer
Mar 8, 2001
9
US
Hello,

I am trying to call a function from an ActiveX DLL created in VB6 from Visual FoxPro 5, and not having much luck.

* The .Dll name is: MyString.DLL
* The fuction name is: GetMyString

I Issue in the command window in Fox:

Declare String GetMyString In MyString
? GetMyString()

Foxpro error is "Cannot find entry point GetMyString in DLL"

The function works fine in VB.

Does anyone know what I am doing wrong, or have an example of calling a VB .DLL from VFP?

Thanks in advance for any help.
 
Hi!

VB DLL is really the COM object. So, GetMyString() function should be a member of the class. Than call in VFP will look like following:

oo = createobjcect("VBProject.VBClass")
? oo.GetMyString()

You will require to register VB DLL on each client computer, you can do this in installation package.

Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top