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

DLL(from C++) in VFP

Status
Not open for further replies.

mensud

Programmer
Jul 22, 2001
51
US
Hi,
I am trying to call some functions from dll developed in VC++, but I can not even create object in VFP for this DLL.
I already tried with DECLARE..., and CREATEOBJECT, but does not work.
Any suggestion?

Thanks
Mensud
 
What kind of DLL is it? There are many kinds of DLLs and some simply can't be called from VFP. Do you have any sample code that "calls" this DLL from any language? (e.g. VC++, VB, Access, etc.)

Rick


 
Yes, I have samples in VB.
The next piece of code creates the session manager object and is used to open a connection and begin a session with QuickBooks

Dim SessionManager As New QBFC2Lib.QBSessionManager
SessionManager.OpenConnection cAppID, cAppName
SessionManager.BeginSession "", omDontCare

DLL is named: qbfc2_1.dll
 
While I don't have this DLL to try, I'd guess:
Code:
SessionManager = CreateObject("QBFC2Lib.QBSessionManager")
SessionManager.OpenConnection(cAppID, cAppName)
SessionManager.BeginSession("", omDontCare)
This assumes that "QBFC2Lib.QBSessionManager" is in the registry that way, and that you have appropriate variables declared and intialized for cAppID, cAppName and omDontCare.

Rick


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top