[python-win32] (no subject)
徐仲谨
xuzhongjin at mychery.com
Tue Oct 23 06:39:28 CEST 2012
Hi ladies/gentlemen,
What I do now is based on Motorola Scan Bar Code SDK to do some development.
SDK is COM thing. there are API Commands and API Events as they called.
API Commands¡¯ development is finished. But Events no, I tried, but failed.
Could u give some help ~ ~.
Thank you.
<CODE>
from pythoncom import *
from win32com.client import *
drv = win32com.client.Dispatch("CoreScanner.CoreScanner",clsctx =
CLSCTX_ALL)
Then I can use the method/attribute, such as Open, Close and so on. Goooood.
class LocalScanEvent:
def OnBarcodeEvent(self, eventType=0, pscanData=pythoncom.Empty):
print "@@@@@@@@@@@@"
evt = = DispatchWithEvents("CoreScanner.CoreScanner", LocalScanEvent)
Now prblem appears. I can¡¯t get the LocalScanEvent work. When I debug the
dispatch, it always go to BASECLASS.
How could I do? Please help out. Thank you.
P.S. BASECLASS ¨C it is shows in attachment,¡± class
ICoreScanner(DispatchBaseClass):¡± .
Best regards,
XU Zhongjin
Electronic & Software Engineer
Electronic & Control Department DERI CHERY
No.8 Changchun Rd E&T Development Zone Wuhu Anhui China 241006
+86+553+5925245
+86+13355530465
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20121023/24df8027/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DB07B9FC-18B0-4B55-9A44-31D2C2F87875x0x1x0.py
URL: <http://mail.python.org/pipermail/python-win32/attachments/20121023/24df8027/attachment.ksh>
More information about the python-win32
mailing list