看板 Python 關於我們 聯絡資訊
感謝!已經可以了,再請教個問題要傳入一組6Bytes命令,我使用c_char_p,但回應給我似乎只有4bytes沒有成功? ------------------------------------ from ctypes import windll,byref,pointer,c_int,c_ushort,c_char,c_char_p import time dll = windll.LoadLibrary("MasterRD.dll") port = 1 baud = 19200 reader_model = 0x41 icdev = 0 msec = 10 color = 2 type = 0x41 REQ_model = 0x52 bcnt = 4 key_model = 0x60 block_b60 = 0x60 block_b61 = 0x61 block_b62 = 0x62 block_b63 = 0x63 pKey =c_char_p(0x010203040506) rf_M1_authentication2 = dll.rf_M1_authentication2(icdev,key_model,block_b60,byref(pKey)) print rf_M1_authentication2 X -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.133.120.236 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1432737016.A.6E9.html
uranusjr: 看不懂, 為什麼不像前一篇一樣把完整 API 寫出來? 05/27 23:17
※ 編輯: waynezen (220.133.120.236), 05/27/2015 23:49:53
waynezen: 已補上,感謝 05/27 23:50
uranusjr: rf_M1_authentication2 的 signature 是什麼?這是重點 05/28 00:41