Posted by: th4416
Hallo together,
im still using CTD 2.0 and have to integrate an application (ELOoffice),
which supports an ole interface, as per software producer. I have an manual
with visual basic examples, which I tested and works fine.
Now I wanted to integrate the interface with ActiveX, but there is no entry
in the ActiveX Explorer and after web searching, I got the information that
ELO don't supports an ActiveX interface. And now there is the moment I need
help.
How can I integrate an OLE interface without ActiveX???
Here are a Visual Basic example which works.
Set ELO = CreateObject("Elo.office")
MsgBox "Elo Version = " & Elo.Version
In the manual are much more functions I need and as per manual it looks easy
to use in visual basic :-(.
Must I clone these functions in CTD, like my example?
My CTD-test as a COM Proxy Class:
Internal Function: ifStart
Description:
Returns
Boolean:
Parameters
Static Variables
Local variables
Boolean: l_bOk
clscomELO: l_oELO
Number: l_nVersion
Actions
Set l_bOk = l_oELO.cfCreate ()
! Works fine
!
Call l_oELO.cfVersion ( l_nVersion )
! Don't Work
!
Call l_oELO.cfClose ()
! Works fine
!
Call SalMessageBox ( SalNumberToStrX ( l_nVersion,
0 ), "SSSSS", MB_Ok )
!
Return l_bOk
COM Proxy Class: clscomELO
Function: cfCreate
Description:
Returns
Boolean:
Parameters
Static Variables
Local variables
Actions
Return CreateObject( "Elo.office" )
Function: cfGetVersion
Description:
Returns
Boolean:
Parameters
Receive Number: rp_nVersion
Static Variables
Local variables
Boolean: l_bOk
Variant: l_vReturn
String: l_sReturn
Actions
Set l_bOk = TRUE
!
Set rp_nVersion = NUMBER_Null
!
! Set l_bOk = Invoke( "Version", INVOKE_FUNCTION )
Set l_bOk = Invoke( "Version", INVOKE_GET )
!
! Call PopNumber(-1, rp_nVersion)
Call PopVariant(-1, l_vReturn)
Set l_bOk = l_vReturn.GetString ( l_sReturn )
Set rp_nVersion = SalStrToNumber ( l_sReturn )
!
Call FlushArgs()
!
Return l_bOk
Function: cfClose
Description:
Returns
Boolean:
Parameters
Static Variables
Local variables
Boolean: l_bOk
Actions
Set l_bOk = TRUE
Set l_bOk = Detach ()
Return l_bOk