[fpc-pascal]More strangeness...

Marco van de Voort marcov at stack.nl
Sat Aug 30 11:51:22 CEST 2003

> 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.
> Not to be sarcastic or anything...  then what is causing this?

Something else. But I think you are on the wrong track with HWND.

What you could do is increase the granularity of windows API checking.

I'm no Windows hero, but the WinAPI must have some checking (return values,
a function like GetLastWinError or something), and try to check that after
_each_ winapi call.

(or first scatter them roughly, and then increase the granularity only
on the place where you expect errors).

This is an approach that works both when you are wrong about HWND, (and it
is something else) but also if I'm wrong and it is HWND.

If somewhere something corrupted is delivered to the winapi, there is a fair
chance the winapi will give some errorcode back, sooner or later.

More information about the fpc-pascal mailing list