Re: [Tutor] Passing Data to .DLL

2014-10-23 Thread Wilson, Pete
No worries, if I could spell I would have been a Lawyer. Pete > -Original Message- > From: eryksun [mailto:eryk...@gmail.com] > Sent: Wednesday, October 22, 2014 5:36 PM > To: Wilson, Pete > Cc: tutor@python.org > Subject: Re: [Tutor] Passing Data to .DLL > > On W

Re: [Tutor] Passing Data to .DLL

2014-10-23 Thread Wilson, Pete
sun [mailto:eryk...@gmail.com] > Sent: Wednesday, October 22, 2014 4:16 AM > To: Wilson, Pete > Cc: tutor@python.org > Subject: Re: [Tutor] Passing Data to .DLL > > On Tue, Oct 21, 2014 at 7:04 PM, Wilson, Pete > wrote: > > > > ProcessIncomingSerialData_t

Re: [Tutor] Passing Data to .DLL

2014-10-22 Thread eryksun
On Wed, Oct 22, 2014 at 6:05 PM, eryksun wrote: > from_buffer_copy is similar, accept instead of sharing the buffer That should be ex-cept (conjunction for an exception clause), not ac-cept (verb, to receive). I missed that in my initial proofread. It takes a while to clear my mental buffer enoug

Re: [Tutor] Passing Data to .DLL

2014-10-22 Thread eryksun
On Wed, Oct 22, 2014 at 3:50 PM, Wilson, Pete wrote: > I don't understand the line > rx_buf = (c_uint8 * rx_buf_size).from_buffer_copy(string_buf) A buffer is a block of memory used to pass data between functions, processes, or systems. Specifically its use as a 'buffer' comes from using a block

Re: [Tutor] Passing Data to .DLL

2014-10-22 Thread eryksun
On Tue, Oct 21, 2014 at 7:04 PM, Wilson, Pete wrote: > > ProcessIncomingSerialData_t = CFUNCTYPE(None, POINTER(c_uint8), c_uint16) > process_incoming_serial_data = pt_dll.ProcessIncomingSerialData > process_incoming_serial_data.argtypes = [ProcessIncomingSerialData_t] ProcessIncomingSerialData ta

Re: [Tutor] Passing Data to .DLL

2014-10-22 Thread Alan Gauld
On 22/10/14 01:04, Wilson, Pete wrote: The python code is below.. ''' read_bat.py ''' You are using triple quoted strings as a commenting feature. Thats good practice where you want a docstring to appear in the help() screen but its not so good for comments like the above or where you are comm

[Tutor] Passing Data to .DLL

2014-10-22 Thread Wilson, Pete
I am having problems passing a pointer and uint8 to a .DLL. I have been successful registering call -backs with this .DLL. So it is all 32-bit and ctypes are working. Everything is working up to the line #set-up ProcessingIncomingSerialData. I tried the direct approach and then morphing the cal