[python-win32] python-win32 Digest, Vol 135, Issue 13
jh_wang2004
jh_wang2004 at 163.com
Tue Jul 1 13:45:42 CEST 2014
Hi Tim: Thanks a lot for you reply. According to the COM document , the function declaration in C++ is lRet = object.ReadDeviceBlock(szDevice、lSize、*lplData) Long lRet (return value, 0 is read success, otherwise is read failed) Output CString szDevice (Device register name) Input Long lSize (Read data counter) Input Long *lplData (restore read value from device) Output and Visual Basic .NET is IRet = object.ReadDeviceBlock(szDevice、iSize、iData(0)) Integer IRet (return value) Output String szDevice (Device register name) Input Integer iSize (Read data counter) Input Integer iData(n) (Read value from device) Output The COM is provided by device vender, this fuction read a group(block) of data from device and wrire those data to a array. The number of data read from device is second parameter. those data will be restored to a array which first element is the third parameter, it's a long int pointer. I run the demo program(C++ and VB), those all write data to the array successfully. For read single data from device, the COM provide another function: lRet = object.GetDeviceValue(szDevice, *lplData) Long lRet (return value) Output CString szDevice (Device register name) Input Long *lplData (restore read value from device) Out
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140701/9d4a812f/attachment.html>
More information about the python-win32
mailing list