Quantcast
Channel: Plantronics Developer Connection : Popular Discussions - Forums & Support
Viewing all articles
Browse latest Browse all 2541

SpokesWrapper.Connect returns false for some devices

$
0
0

Hi,

 

I have noticed that the method "Connect" of SpokesWrapper returns false when a Savi device or a CS60 device is connected on the pc.

 

I have traced the exception that is caught inside "Connect":

 

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Interop.Plantronics.dll

SpokesWrapper System.Runtime.InteropServices.COMException (0x80040200): Exception from HRESULT: 0x80040200

   at System.Runtime.InteropServices.ComTypes.IConnectionPointContainer.FindConnectionPoint(Guid& riid, IConnectionPoint& ppCP)

   at Interop.Plantronics.IDeviceCOMEventsExt_EventProvider.Init()

   at Interop.Plantronics.IDeviceCOMEventsExt_EventProvider.add_HeadsetStateChanged(IDeviceCOMEventsExt_HeadsetStateChangedEventHandler )

   at Interop.Plantronics.BaseDeviceEventClass.add_HeadsetStateChanged(IDeviceCOMEventsExt_HeadsetStateChangedEventHandler )

   at Plantronics.UC.SpokesWrapper.Spokes.AttachDevice() in c:\temp\2380\lib\DriverLib\SpokesWrapper.cs:line 1271

   at Plantronics.UC.SpokesWrapper.Spokes.Connect(String SessionName) in c:\temp\2380\lib\DriverLib\SpokesWrapper.cs:line 855 (SpokesDriver.cs:17)

 

After some debugging, I've noticed that the problem is caused by adding handler to some events in AttachDevice at these lines:

 

// LC, Nemanja change, wire up serial number friendly events

IDeviceCOMEventsExt_Event eex = m_deviceComEvents as IDeviceCOMEventsExt_Event;

eex.HeadsetStateChanged += eex_HeadsetStateChanged;

IBaseCOMEvents_Event be = m_deviceComEvents as IBaseCOMEvents_Event;

be.BaseEventReceived += be_BaseEventReceived;

 

I think that this section of code should be inside a try/catch, otherwise the code below (in AttachDevice) will not be executed.

 

WDYT ?

Cheers

Staffan


Viewing all articles
Browse latest Browse all 2541

Trending Articles