如何将128位长值传递给需要常量无符号字符的cdll函数*
选择 | 换行 | 行号
- from ctypes import*
- cdll = "Windll"
- var = 0x1fffffffffffffffffffffff # I want to send this long variable to character pointer which is in cdll
- cdll.createBuff (var)
- cdll function
- int createBuff (const unsigned char*){
- print charBuff
- return 0;
- }
将128位Long值传递给cdll函数时遇到问题,需要常量无符号字符*。我如何做到这一点,我研究了这个主题,我在python中发现了ctypes。我没有得到任何线索来解决在ctypes中使用的问题。请帮我解决这个问题。