Re: ctypes: using .value or .value() doesn't work for c_long

2015-04-15 Thread Ian Kelly
On Wed, Apr 15, 2015 at 1:48 PM, IronManMark20 mr.smit...@gmail.com wrote: 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

ctypes: using .value or .value() doesn't work for c_long

2015-04-15 Thread IronManMark20
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? --

Re: ctypes: using .value or .value() doesn't work for c_long

2015-04-15 Thread ethansmithoakland
Thanks so much! Btw (face-palm) Dave, I know dir(), I probably should have used it here, I just read that the return type was a c_long, and I didn't know that LP_c_long was a pointer. Thanks to you both! -- https://mail.python.org/mailman/listinfo/python-list

Re: ctypes: using .value or .value() doesn't work for c_long

2015-04-15 Thread Dave Angel
On 04/15/2015 03:48 PM, IronManMark20 wrote: 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.