[python-chinese] 请问如何向ctypes类型函数传递指针参数

jason python.nbfan python.nbfan在gmail.com
星期三 八月 1 12:53:13 HKT 2007


a=ctypes.c_char_p()
a.value="2007-7-7"
>>> type(a)
<class 'ctypes.c_char_p'>

print a
c_char_p('2007-7-7')
>>> print a.value
2007-7-7

在07-7-30,breezef at gmail.com <breezef at gmail.com> 写道:
>
> 如,函数
> getpkt(US fd, US* des_aid, US* des_said, US* src_said,
>                             char* data, UI dataSize)
> 其中data为字符指针,那么如何用ctype类型传递指针给它
>
>
>
>
>
> breezef at gmail.com
> 2007-07-30
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20070801/442791ce/attachment.html 


关于邮件列表 python-chinese 的更多信息