I think I finally have a fix. I believe I needed to specify the argtypes
for the function objects loaded by importing ctypes. I did not get the
correct behavior when only specifying the return types. One issue may be
that my return type for 'SetWindowLongPtrW' was a function signature that I
declared with ctypes. This return type might need to match the argtype
of 'CallWindowProc',
which was an int. Now they are both WNDPROC (declared with ctypes).

Thanks for all the help. I feel like I learned a magic trick.
John


On Thu, May 9, 2013 at 5:59 PM, Tim Roberts <t...@probo.com> wrote:

> John Grant wrote:
> >
> > I was not sure if I could initialize a Python integer with a hex like
> > I can in C. The explicit "cast" was to make sure the default type was
> > not float or unsigned.
>
> Python does not have unsigned types.  Numbers are either integers
> (infinitely large) or floats.
>
>
> > I am seeing an exception that only shows up for some mouse events,
> > sometimes. I can usually reproduce it for a middle-mouse click. The
> > error message is difficult to read as it streams by on the console
> > window (shell), but I've seen a couple things that make me think one
> > of my callbacks is prototyped incorrectly. These are the things I've
> > been able to read while the output quickly streams by.
> > "long int too long"
> > "callback .... in line XXX of ctypes.c"
>
> Hmmm.  Not sure I can explain that.
>
> --
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to