Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP - Using third party API
Message
De
16/12/2009 02:57:56
Alhad Marathe
Asm Consulting
Mumbai, Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
VFP - Using third party API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01439307
Message ID:
01439307
Vues:
251
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform