Win32Lib bug
While testing the beta release translator,
I came across a bug in Win32Lib.ew.
There are a couple of places where the
Windows API routines ChildWindowFromPoint() and
ChildWindowFromPointEx() are called incorrectly.
The second argument is supposed to be a POINT structure.
Euphoria does not allow you to pass a C structure by
value. You can only pass the address of a structure.
In Win32Lib.ew an attempt is made to pass the *address*
of a POINT structure, but this is not what the C routine expects.
typedef struct {
LONG x;
LONG y;
} POINT;
What you should do, is define an extra argument for these
routines in define_c_func(), and pass the two fields
of the POINT structure as if they were separate arguments.
something like:
ChildWindowFromPoint(handle, x, y)
This will push the values of x and y onto the call stack just like
a POINT structure would be pushed, when passed by value.
There may be other cases in Win32Lib where
it's necessary to pass a structure by value, but I
believe this not very common in the WIN32 API.
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
|
Not Categorized, Please Help
|
|