PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Re: using ActiveX
Re: using ActiveX
Iniciado por guest, 30,sep. 2015 09:25 - 4 respuestas
Publicado el 30,septiembre 2015 - 09:25
Hello,

How to use an ActiveX supplied by another vendor in Windev 20 ? I've an activeX supplied by Logix Mobiles, which could be used to send SMS via GSM mobile / modem. And that's working fine with my powerbuilder application. I want to use the same with Windev. How to proceed ? Got no idea how to deal with activeX in windev.

WDXView is not listing this activeX. A mcore.dll is supplied by the vendor which got registered in windows registry.


My powerbuilder code goes like this.
// Powerbuilder code
OLEObject objSMS
ObjSMS = Create ObjSMS
ll_return = objSMS.ConnectToNewObject("mCore.SMS")

If ll_return >= 0 Then
objSMS.License.Company = "Licence details"

objSMS.Port = gs_port
objSMS.BaudRate = gl_baudrate
objSMS.DataBits = gl_databits
objSMS.Parity = gs_parity
objSMS.StopBits = gs_stopbits
objSMS.DisableCheckPIN = gs_disablecheckpin

objSMS.Connect

If objSMS.IsError (True, 'ElifaSMS') Then
Messsagebox('Elifa', 'Connect failure')
Return
Else
ls_send = objSMS.SendSMS("Mobile Number", ls_message, False)
\ // Check success / failure and proceed further
End If
Else
Messagebox('Elifa', 'SMS Components not found. Install SMS components.')
Return
End If


Need your help in using this component with Windev. Thanks.

Happiness Always
BKR Sivaprakash
Publicado el 30,septiembre 2015 - 10:40
You can do something like this

sCLSID is string = "{96BBABBE-0B6C-4240-8334-BD9360DCE0AA}"
ObjSMS = new object Automation sCLSID

you can find the clsid for your component somewhere in the registry or in the documentation of your dll.
Publicado el 30,septiembre 2015 - 11:03
Hello Arie,

Is this GUIID will be same wherever this dll is installed or registered ?

Or we must fetch this GUID from every computer, where this activeX is distributed ?

Happiness Always
BKR Sivaprakash
Publicado el 30,septiembre 2015 - 11:54
Afaik it is always the same
Publicado el 01,octubre 2015 - 07:09
Hello Arie,

asCLSID is string = "mCore.SMS"
ObjSMS is dynamic Automation object
ObjSMS = new object Automation asCLSID

This works. No need to find the CLSID, I think.

Happiness Always
BKR Sivaprakash