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
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to