Print Page | Close Window

Unable to cast object

Printed From: Way2call Communications
Category: Hi-Phone Software Development Kit (SDK)
Forum Name: Hi-Phone and .NET
Forum Description: Discussion on the Hi-Phone product family, its .NET interface, samples and development tools
Printed Date: Mar 26 2023 at 9:37pm

Topic: Unable to cast object
Posted By: mattj
Subject: Unable to cast object
Date 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:


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. -

Posted By: mattj
Date Posted: Apr 21 2010 at 11:12am
Sorry, it choes up at


in cls_call.CallNumber.

(editing/deleting posts would be a useful feature)

Posted By: mattj
Date 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

        End Get
    End Property

Print Page | Close Window