I am using ctypes to call a few windll funcions. One of them returns a c_long object. I want to know what number the function returns. Problem is, when I try foo.value , it gives me this: AttributeError: LP_c_long object has no attribute value. Any idea of what could cause this?