On 14 June 2023 20:59:41 +0200, "Rafael Picanço via fpc-pascal"
<[email protected]> wrote:
Hi Rafael,
>I am trying to follow your advice and use units instead:
>
>const
> EXTERNAL_DEV_NONE : TGetExButtonStatesFunction = Pointer(0);
>
>However I am receiving an error:
>
>Error: Incompatible types: got "Pointer" expected "<procedure variable type
>of function(PCCDBS):LongInt;CDecl>"
>
>Please, can you shed some light on this?
I can't test it right now, but I believe that
const
EXTERNAL_DEV_NONE : TGetExButtonStatesFunction =
TGetExButtonStatesFunction (Pointer(0));
(i.e. with an explicit typecast to the required type) should work.
Tomas
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal