Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP - Using third party API
Message
From
16/12/2009 02:57:56
Alhad Marathe
Asm Consulting
Mumbai, India
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
VFP - Using third party API
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01439307
Message ID:
01439307
Views:
252
I have an application where the customer wants to send text messages to Cellphones of his customers on certain events. He has a software which can do this from an Excel Sheet. The company has given an API which can be used with VB. The help file gives the following example

The COM object is defined by the following class name: clsHTTP_API_COM_Obj

VISUAL BASIC – EARLY BINDING
NOTE: Make sure that you reference the ‘HTTP_API_COM_Object Type Library’ for all early binding examples

Dim objSMS as clsHTTP_API_COM_Object
Set objSMS = New clsHTTP_API_COM_Object
objSMS.UserName=xxxxxx
objSMS.Passwd=xxxxxxx
objSMS.SendSMS “9198xxxx”,”Test Msg”,”SMSCountry”
MsgBox objSMS.GetBalance

I tried the code in VB 6 and it works fine. What I don't understand is how to make it work in VFP. Do I use the declare DLL Function?
I tried using x = CREATEOBJECT("clsHTTP_API_COM_Obj"), but VFP returns an error "Class definition clsHTTP_API_COM_Obj not found"

Any help will be greatly appreciated.

Thanks

Alhad
Only direct experience is Knowledge;
Everything else is just Information.
Next
Reply
Map
View

Click here to load this message in the networking platform