I've updated the SDK so now I'm current.
But now I'm pretty confused.
In my old code, I was using RegisterEventCB. There is no corresponding UnregisterEventCB.
But there are some new methods: RegisterGenericEventCB and RegisterStatusChangeCB and their corresponding Unregister calls.
So, I tried out RegisterGenericEventCB. I'm not able to get it to work. I get the error "Public member 'name' on type 'MarshalByRefObject' not found." as soon as I call the RegisterGenericEventCB command. Per the documentation, I've added a Name property, used Inherits MarshalByRefObject in the class definition, and made the class serializable.
Here's my code:
Just to reiterate, I'm NOT running this in a plug-in -- it's an external app.
help!
</serializable()></serializable()>
But now I'm pretty confused.
In my old code, I was using RegisterEventCB. There is no corresponding UnregisterEventCB.
But there are some new methods: RegisterGenericEventCB and RegisterStatusChangeCB and their corresponding Unregister calls.
So, I tried out RegisterGenericEventCB. I'm not able to get it to work. I get the error "Public member 'name' on type 'MarshalByRefObject' not found." as soon as I call the RegisterGenericEventCB command. Per the documentation, I've added a Name property, used Inherits MarshalByRefObject in the class definition, and made the class serializable.
Here's my code:
Code:
<serializable()><serializable()>Serializable() _ 'Removed LT and GT for this post because they don't render properly Public Class hsclass Inherits MarshalByRefObject Private _Name As String = "hsClass1" Public Event HSEventReceived(ByVal evtype As Integer, ByVal parms As Object) Public Sub HSEvent(ByVal evtype As Integer, ByVal parms As Object) RaiseEvent HSEventReceived(evtype, parms) End Sub Public Property Name() As String Get Return _Name End Get Set(ByVal value As String) _Name = value End Set End Property Public Sub New() 'This line errors out with </serializable()></serializable()>Public member 'name' on type 'MarshalByRefObject' not found. <serializable()><serializable()> hsapp.RegisterGenericEventCB("*", Me) End Sub End Class
help!
</serializable()></serializable()>
Comment