如何将128位长值传递给需要常量无符号字符的cdll函数*

选择 | 换行 | 行号
  1. from ctypes import*
  2.  
  3. cdll = "Windll"
  4. var = 0x1fffffffffffffffffffffff # I want to send this long variable to character pointer which is in cdll
  5.  
  6.  
  7. cdll.createBuff (var)
  8.  
  9. cdll function
  10. int createBuff (const unsigned char*){
  11.    print charBuff
  12.    return 0;
  13. }

将128位Long值传递给cdll函数时遇到问题,需要常量无符号字符*。我如何做到这一点,我研究了这个主题,我在python中发现了ctypes。我没有得到任何线索来解决在ctypes中使用的问题。请帮我解决这个问题。

标签: python

添加新评论