Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP - Using third party API
Message
From
18/12/2009 00:22:52
Alhad Marathe
Asm Consulting
Mumbai, India
 
 
To
16/12/2009 09:49:37
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01439307
Message ID:
01439706
Views:
44
Thanks a lot. Registering the dll with regsvr32.exe worked.


>Hi Alhad,
>
>I've found that the TLB isn't always available for .dll's. But, if you create a form, drop an ole control on the form and select the Class Name from the list (if you don't see the Com Class represented there, register it with regsvr32.exe and try again) you can then look at the oleClass property of the object on the form. That property will be a valid name for instantiating the object. If there is an extra
. <n>
on the end of the classname, that can be used, or can usually be ignored, as that is a minor version number, and typically using the
<classlibrary>.<class>
designation is all that is needed.
>
>hth,
>
>Hank
>
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform