Re: Cannot coerce a BlockCallback to ExternalCallback*
Posted by Chris Uppal-3 on Apr 17, 2006; 8:50am
URL: https://forum.world.st/Cannot-coerce-a-BlockCallback-to-ExternalCallback-tp3378227p3378240.html
Blair,
> This is "by design". It was never intended that ExternalCallbacks should
> be directly passable as interop parameters, nor that they could be used
> as the parameter type either.
Ok, that makes sense, thanks.
> If you look in the base image you'll find
> callbacks are always declared as lpvoid.
I did look, and would have switched to that way of doing things if I couldn't
make it work the way I preferred. I don't like using void*-s unless I have
to -- there's too much chance of error with external interfacing so I like
(just for once ;-) the more static approach to typing. The existing code seems
to use void* more than is necessary, so I didn't realise that in this instance
it /was/ necessary.
Perhaps it would be worth "adding" ;-) a note to that effect to the
ExternalCallback's class comment ? And perhaps too to the relevant section of
the education centre ?
-- chris