[fpc-pascal]More strangeness...

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Sat Aug 30 10:05:20 CEST 2003


On Fri, 29 Aug 2003, L D Blake wrote:

> In reply to your message of August 29, 2003
> > Yes I think about it. Typed negative on this side (the pascal side). On
> > 2-complements it is the same binary layout, only the interpretation is
> > different.  The win32 API sees no difference, since it puts its own typing
> > over it.
>
> Turn on Pascal's range checking and watch what happens...
>
> I counted the errors and counted the HWNDs in my application... one error for
> each window handle.
>
> Also... as I reported, it garbles the display. I'm thinking the window handle
> is *changed* by the mismatch, giving rise to the possibility of duplicate handles.
>
> (My app is highly visual... most everything occurs on the screen.)

We can discuss principles for hours of course, but that doesn't help you.
Did  you try to change the HWND type from longint to DWORD or Cardinal
(which is the same) in the windows unit ? If so, does it help ?

Did you turn off range checking ? If so, what is the effect ?

At work I run NT 4, at home Windows 2000. I repeat my offer:
If you want to send me your code, I can perform the necessary tests.

Michael.





More information about the fpc-pascal mailing list