On 14 June 2023 20:59:41 +0200, "Rafael Picanço via fpc-pascal" 
<fpc-pascal@lists.freepascal.org> 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  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to