How Is This Conversion An Error?

Louis

Active Member
Licensed User
Longtime User
Hi.
In Basic4ppc when I pass one type from a library to another, different library I get an error from Basic4ppc that says the objects cannot be converted even though they are of the same type.
E.G. When I made a dll to re-wrap the Channel class in Hekkus and made my New1 method accept a new Channel object that is passed by Speaker.Channel, when I pass it directly to my Channel wrapper Basic4ppc says the HssNET.Channel can't be converted to hssNET.Channel. Any suggestions? Making a Channel.value property to hold the object didn't help either. I need to do it this way because all methods in the Channel class are pure .NET Virtual calls and the New1 method in the original hssNET desktop/device can't be called from Basic4ppc and are NOT suppose to because of this.
Thanks everyone.
 

Louis

Active Member
Licensed User
Longtime User
Hi. In the hssNetdesktop/device.dll, the Speaker.Channel returns a new Channel object. When I pass the new object to my wrapped Channel class directly like this chl.New1 'Chl is a ChannelWrapper object
c = speaker.PlaySound(Sound1.value)
chl.value = speaker.Channel(c) 'This call returns a brand new Channel object, assigning it to chl.value
Basic4ppc shows the Conversion error on the chl.value line. My wrapped object accepts Channel objects by value. I got a Visual Basic error when trying to do it by Reference. Thanks.
 
Top