[python-win32] Trouble with SetWindowLong().

Ben Timby btimby at gmail.com
Sun Jan 16 05:06:01 CET 2011


I am using pywin32 214 on Windows XP 32 bit. I am calling SetWindowLong like so:

--
import win32api, win32con

def fun():
    print 'fun'

h = win32api.GetCurrentProcess()
win32api.SetWindowLong(h, win32con.GWL_WNDPROC, fun)
--

But receiving:

TypeError: Unable to convert function to pointer-sized value

My google-fu fails me. Any hints?


More information about the python-win32 mailing list