New Posts New Posts RSS Feed - Unable to cast object
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Way2call telephony device is your ultimate telephony integration solution!

Unable to cast object

 Post Reply Post Reply
Author
mattj View Drop Down
Newbie
Newbie


Joined: Apr 15 2010
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattj Quote  Post ReplyReply Direct Link To This Post Topic: Unable to cast object
    Posted: Apr 21 2010 at 11:10am
I'm trying to create a set of generic classes from the SDK .net example. Everything compiles fine but I get the error:

"Unable to cast object of type 'XXX.cls_way2call' to type 'System.ComponentModel.ISynchronizeInvoke'."


It chokes up at:

cls_call.Driver.Device(INT_PROP_DEVICE).Open(0)


I'm not sure exactly what's going on here. Any help would be much appreciated. I've attached a link to the classes below.

http://mattjan.us/cls_call.zip
Back to Top
mattj View Drop Down
Newbie
Newbie


Joined: Apr 15 2010
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattj Quote  Post ReplyReply Direct Link To This Post Posted: Apr 21 2010 at 11:12am
Sorry, it choes up at

Driver.Device(INT_PROP_DEVICE).Open(0)

in cls_call.CallNumber.


(editing/deleting posts would be a useful feature)
Back to Top
mattj View Drop Down
Newbie
Newbie


Joined: Apr 15 2010
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattj Quote  Post ReplyReply Direct Link To This Post Posted: Apr 21 2010 at 2:54pm
I got my class working by adding

Implements System.ComponentModel.ISynchronizeInvoke

Do i need to add anything to the following functions?:


   Public Function BeginInvoke(ByVal method As System.Delegate, ByVal args() As Object) As System.IAsyncResult Implements System.ComponentModel.ISynchronizeInvoke.BeginInvoke

    End Function

    Public Function EndInvoke(ByVal result As System.IAsyncResult) As Object Implements System.ComponentModel.ISynchronizeInvoke.EndInvoke

    End Function

    Public Function Invoke(ByVal method As System.Delegate, ByVal args() As Object) As Object Implements System.ComponentModel.ISynchronizeInvoke.Invoke

    End Function

    Public ReadOnly Property InvokeRequired() As Boolean Implements System.ComponentModel.ISynchronizeInvoke.InvokeRequired
        Get

        End Get
    End Property
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.