SWYX & xHarbour?

This is a discussion on SWYX & xHarbour? within the xharbour forums in Programming Languages category; second try... It seems I had some problems with my newsserver... .... Hi there, anyone here who has a xHarbour-application communicating with SWYX (IP telephone software)? I not in C-programming at all, so I don't know where to start. After running this code... TRY oSwyx := GetActiveObject ("CLMgr.ClientLineMgr") CATCH TRY oSwyx := CreateObject ("CLMgr.ClientLineMgr") lSwyx := .T. CATCH lSwyx := .F. END END I do have these vars: lSwyx -> .T. oSwyx:cclassname -> CLMgr.ClientLineMgr oSwyx:hobj -> 3742348 oSwyx leValue -> DISP_E_MEMBERNOTFOUND oSwyx oleenumerator -> NIL The next time I try to work with oSwyx my program crashes, because of "DISP_E_MEMBERNOTFOUND". ...

Go Back   Application Development Forum > Programming Languages > xharbour

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-02-2008, 09:16 AM
Thierry
Guest
 
Default SWYX & xHarbour?

second try... It seems I had some problems with my newsserver...

....

Hi there,

anyone here who has a xHarbour-application communicating with SWYX (IP
telephone software)?

I not in C-programming at all, so I don't know where to start.

After running this code...

TRY
oSwyx := GetActiveObject ("CLMgr.ClientLineMgr")
CATCH
TRY
oSwyx := CreateObject ("CLMgr.ClientLineMgr")
lSwyx := .T.
CATCH
lSwyx := .F.
END
END

I do have these vars:

lSwyx -> .T.
oSwyx:cclassname -> CLMgr.ClientLineMgr
oSwyx:hobj -> 3742348
oSwyxleValue -> DISP_E_MEMBERNOTFOUND
oSwyxoleenumerator -> NIL

The next time I try to work with oSwyx my program crashes, because of
"DISP_E_MEMBERNOTFOUND". Am I missing a file?

What is the file CLMgrPub.idl (Directory PublicInterface) mentioned in
the SDK good for? Do I have to include this into my code?

As you see, I don't have plan what I'm doing here. It seems a long way
to go. ;-)

Any hints would be appreciated!

Thierry

PS: xHarbour is such a great software! I never had so much fun trying
crazy things with my clipper-app the last 10 years...

PS2: Swyx-SDK:
http://www.swyx.com/support/knowledg...l?tx_swyxkbase
_pi1[kbid]=kb2288


Reply With Quote
  #2  
Old 09-02-2008, 11:07 AM
Ron Pinkas
Guest
 
Default Re: SWYX & xHarbour?

Thierry

If you can show us a working VBScript sample, we'll be happy to help you
convert it to xHarbour.

Ron

> second try... It seems I had some problems with my newsserver...
>
> ...
>
> Hi there,
>
> anyone here who has a xHarbour-application communicating with SWYX (IP
> telephone software)?
>
> I not in C-programming at all, so I don't know where to start.
>
> After running this code...
>
> TRY
> oSwyx := GetActiveObject ("CLMgr.ClientLineMgr")
> CATCH
> TRY
> oSwyx := CreateObject ("CLMgr.ClientLineMgr")
> lSwyx := .T.
> CATCH
> lSwyx := .F.
> END
> END
>
> I do have these vars:
>
> lSwyx -> .T.
> oSwyx:cclassname -> CLMgr.ClientLineMgr
> oSwyx:hobj -> 3742348
> oSwyxleValue -> DISP_E_MEMBERNOTFOUND
> oSwyxoleenumerator -> NIL
>
> The next time I try to work with oSwyx my program crashes, because of
> "DISP_E_MEMBERNOTFOUND". Am I missing a file?
>
> What is the file CLMgrPub.idl (Directory PublicInterface) mentioned in the
> SDK good for? Do I have to include this into my code?
>
> As you see, I don't have plan what I'm doing here. It seems a long way to
> go. ;-)
>
> Any hints would be appreciated!
>
> Thierry
>
> PS: xHarbour is such a great software! I never had so much fun trying
> crazy things with my clipper-app the last 10 years...
>
> PS2: Swyx-SDK:
> http://www.swyx.com/support/knowledg...l?tx_swyxkbase
> _pi1[kbid]=kb2288
>
>



Reply With Quote
  #3  
Old 09-02-2008, 11:34 AM
Thierry
Guest
 
Default Re: SWYX & xHarbour?

Hi Ron,

I found this sample:

---------------------------------------------------------------------------
'
' Project: Swyx Client SDK
'
' Module: Simple Visual Basic Script sample
'
'----------------------------------------------------------------------------

Option Explicit

Dim PhoneLineMgr : Set PhoneLineMgr = Nothing
Dim PhoneLineFocus : Set PhoneLineFocus = Nothing

Dim errval

Set PhoneLineMgr = Wscript.CreateObject("CLMgr.ClientLineMgr") : CheckError

errval = PhoneLineMgr.DispSimpleDial("001191")

Set PhoneLineMgr = Nothing

Sub CheckError
Dim message, errRec
If Err = 0 Then Exit Sub
message = Err.Source & " " & Hex(Err) & ": " & Err.Description
Fail message
End Sub

Sub Fail(message)
Wscript.Echo message
Wscript.Quit 2
End Sub


> Thierry
>
> If you can show us a working VBScript sample, we'll be happy to help you
> convert it to xHarbour.
>
> Ron
>
>> second try... It seems I had some problems with my newsserver...
>>
>> ...
>>
>> Hi there,
>>
>> anyone here who has a xHarbour-application communicating with SWYX (IP
>> telephone software)?
>>
>> I not in C-programming at all, so I don't know where to start.
>>
>> After running this code...
>>
>> TRY
>> oSwyx := GetActiveObject ("CLMgr.ClientLineMgr")
>> CATCH
>> TRY
>> oSwyx := CreateObject ("CLMgr.ClientLineMgr")
>> lSwyx := .T.
>> CATCH
>> lSwyx := .F.
>> END
>> END
>>
>> I do have these vars:
>>
>> lSwyx -> .T.
>> oSwyx:cclassname -> CLMgr.ClientLineMgr
>> oSwyx:hobj -> 3742348
>> oSwyxleValue -> DISP_E_MEMBERNOTFOUND
>> oSwyxoleenumerator -> NIL
>>
>> The next time I try to work with oSwyx my program crashes, because of
>> "DISP_E_MEMBERNOTFOUND". Am I missing a file?
>>
>> What is the file CLMgrPub.idl (Directory PublicInterface) mentioned in the
>> SDK good for? Do I have to include this into my code?
>>
>> As you see, I don't have plan what I'm doing here. It seems a long way to
>> go. ;-)
>>
>> Any hints would be appreciated!
>>
>> Thierry
>>
>> PS: xHarbour is such a great software! I never had so much fun trying
>> crazy things with my clipper-app the last 10 years...
>>
>> PS2: Swyx-SDK:
>> http://www.swyx.com/support/knowledg...l?tx_swyxkbase
>> _pi1[kbid]=kb2288
>>
>>

>
>

Reply With Quote
  #4  
Old 09-02-2008, 12:04 PM
Ron Pinkas
Guest
 
Default Re: SWYX & xHarbour?

If that VbScript works on your system, then the following should work too:

PROCEDURE Main()

LOCAL Set PhoneLineMgr
LOCAL errval

Set PhoneLineMgr := CreateObject( "CLMgr.ClientLineMgr" )
errval := PhoneLineMgrispSimpleDial( "001191" )

RETURN

"Thierry" <thierry@tmblues.com> wrote in message
news:g9jmf0$eb8$1@aioe.org...
> Hi Ron,
>
> I found this sample:
>
> ---------------------------------------------------------------------------
> '
> ' Project: Swyx Client SDK
> '
> ' Module: Simple Visual Basic Script sample
> '
> '----------------------------------------------------------------------------
>
> Option Explicit
>
> Dim PhoneLineMgr : Set PhoneLineMgr = Nothing
> Dim PhoneLineFocus : Set PhoneLineFocus = Nothing
>
> Dim errval
>
> Set PhoneLineMgr = Wscript.CreateObject("CLMgr.ClientLineMgr") :
> CheckError
>
> errval = PhoneLineMgr.DispSimpleDial("001191")
>
> Set PhoneLineMgr = Nothing
>
> Sub CheckError
> Dim message, errRec
> If Err = 0 Then Exit Sub
> message = Err.Source & " " & Hex(Err) & ": " & Err.Description
> Fail message
> End Sub
>
> Sub Fail(message)
> Wscript.Echo message
> Wscript.Quit 2
> End Sub
>
>
>> Thierry
>>
>> If you can show us a working VBScript sample, we'll be happy to help you
>> convert it to xHarbour.
>>
>> Ron
>>
>>> second try... It seems I had some problems with my newsserver...
>>>
>>> ...
>>>
>>> Hi there,
>>>
>>> anyone here who has a xHarbour-application communicating with SWYX (IP
>>> telephone software)?
>>>
>>> I not in C-programming at all, so I don't know where to start.
>>>
>>> After running this code...
>>>
>>> TRY
>>> oSwyx := GetActiveObject ("CLMgr.ClientLineMgr")
>>> CATCH
>>> TRY
>>> oSwyx := CreateObject ("CLMgr.ClientLineMgr")
>>> lSwyx := .T.
>>> CATCH
>>> lSwyx := .F.
>>> END
>>> END
>>>
>>> I do have these vars:
>>>
>>> lSwyx -> .T.
>>> oSwyx:cclassname -> CLMgr.ClientLineMgr
>>> oSwyx:hobj -> 3742348
>>> oSwyxleValue -> DISP_E_MEMBERNOTFOUND
>>> oSwyxoleenumerator -> NIL
>>>
>>> The next time I try to work with oSwyx my program crashes, because of
>>> "DISP_E_MEMBERNOTFOUND". Am I missing a file?
>>>
>>> What is the file CLMgrPub.idl (Directory PublicInterface) mentioned in
>>> the SDK good for? Do I have to include this into my code?
>>>
>>> As you see, I don't have plan what I'm doing here. It seems a long way
>>> to go. ;-)
>>>
>>> Any hints would be appreciated!
>>>
>>> Thierry
>>>
>>> PS: xHarbour is such a great software! I never had so much fun trying
>>> crazy things with my clipper-app the last 10 years...
>>>
>>> PS2: Swyx-SDK:
>>> http://www.swyx.com/support/knowledg...l?tx_swyxkbase
>>> _pi1[kbid]=kb2288
>>>
>>>

>>


Reply With Quote
  #5  
Old 09-03-2008, 11:06 AM
Thierry
Guest
 
Default Re: SWYX & xHarbour?

Ron, you are my hero!

Now, my code for checking an incoming call works too!

FUNCTION getSwyxNo ()
LOCAL oSwyx, oSwyxLine
LOCAL lSwyx := .T.
LOCAL cNo := ""

TRY
oSwyx := GetActiveObject ("CLMgr.ClientLineMgr")
CATCH
TRY
oSwyx := CreateObject ("CLMgr.ClientLineMgr")
lSwyx := .T.

CATCH
lSwyx := .F.
END
END

IF lSwyx
oSwyxLine := oSwyxispSelectedLine

IF oSwyxLineispState # 0
cNo := oSwyxLineispPeerNumber
ELSE
Alert ("No phone call!")
ENDIF
ELSE
Alert ("Swyx not started/installed!")
ENDIF

RETURN cNo

> If that VbScript works on your system, then the following should work too:
>
> PROCEDURE Main()
>
> LOCAL Set PhoneLineMgr
> LOCAL errval
>
> Set PhoneLineMgr := CreateObject( "CLMgr.ClientLineMgr" )
> errval := PhoneLineMgrispSimpleDial( "001191" )
>
> RETURN
>
> "Thierry" <thierry@tmblues.com> wrote in message
> news:g9jmf0$eb8$1@aioe.org...
>> Hi Ron,
>>
>> I found this sample:
>>
>> ---------------------------------------------------------------------------
>> '
>> ' Project: Swyx Client SDK
>> '
>> ' Module: Simple Visual Basic Script sample
>> '
>> '----------------------------------------------------------------------------
>>
>> Option Explicit
>>
>> Dim PhoneLineMgr : Set PhoneLineMgr = Nothing
>> Dim PhoneLineFocus : Set PhoneLineFocus = Nothing
>>
>> Dim errval
>>
>> Set PhoneLineMgr = Wscript.CreateObject("CLMgr.ClientLineMgr") :
>> CheckError
>>
>> errval = PhoneLineMgr.DispSimpleDial("001191")
>>
>> Set PhoneLineMgr = Nothing
>>
>> Sub CheckError
>> Dim message, errRec
>> If Err = 0 Then Exit Sub
>> message = Err.Source & " " & Hex(Err) & ": " & Err.Description
>> Fail message
>> End Sub
>>
>> Sub Fail(message)
>> Wscript.Echo message
>> Wscript.Quit 2
>> End Sub
>>
>>
>>> Thierry
>>>
>>> If you can show us a working VBScript sample, we'll be happy to help you
>>> convert it to xHarbour.
>>>
>>> Ron
>>>
>>>> second try... It seems I had some problems with my newsserver...
>>>>
>>>> ...
>>>>
>>>> Hi there,
>>>>
>>>> anyone here who has a xHarbour-application communicating with SWYX (IP
>>>> telephone software)?
>>>>
>>>> I not in C-programming at all, so I don't know where to start.
>>>>
>>>> After running this code...
>>>>
>>>> TRY
>>>> oSwyx := GetActiveObject ("CLMgr.ClientLineMgr")
>>>> CATCH
>>>> TRY
>>>> oSwyx := CreateObject ("CLMgr.ClientLineMgr")
>>>> lSwyx := .T.
>>>> CATCH
>>>> lSwyx := .F.
>>>> END
>>>> END
>>>>
>>>> I do have these vars:
>>>>
>>>> lSwyx -> .T.
>>>> oSwyx:cclassname -> CLMgr.ClientLineMgr
>>>> oSwyx:hobj -> 3742348
>>>> oSwyxleValue -> DISP_E_MEMBERNOTFOUND
>>>> oSwyxoleenumerator -> NIL
>>>>
>>>> The next time I try to work with oSwyx my program crashes, because of
>>>> "DISP_E_MEMBERNOTFOUND". Am I missing a file?
>>>>
>>>> What is the file CLMgrPub.idl (Directory PublicInterface) mentioned in
>>>> the SDK good for? Do I have to include this into my code?
>>>>
>>>> As you see, I don't have plan what I'm doing here. It seems a long way
>>>> to go. ;-)
>>>>
>>>> Any hints would be appreciated!
>>>>
>>>> Thierry
>>>>
>>>> PS: xHarbour is such a great software! I never had so much fun trying
>>>> crazy things with my clipper-app the last 10 years...
>>>>
>>>> PS2: Swyx-SDK:
>>>> http://www.swyx.com/support/knowledg...l?tx_swyxkbase
>>>> _pi1[kbid]=kb2288
>>>>
>>>>

>

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:10 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.