dongsmail
2021-01-19 13:35python 调用c语言函数 返回值char*中包含的中文不能正确显示
5
//c语言
char* GetData()
{
char buf[64];
sprintf_s(buf, 64,("执行成功"));
return buf;
}
# python
lib.GetData.restype = ctypes.c_char_p
str1 = lib.GetData()
print(str1)
- 点赞
- 回答
- 收藏
- 复制链接分享
2条回答
为你推荐
- 为什么python中print函数无法正常使用end,sep?
- python
- 1个回答
- python 路径匹配中的 *和**通配符用法
- python
- 1个回答
- Python DataFrame 和函数的运用
- python
- 2个回答
- 从php调用python,返回值为2
- python
- php
- 2个回答
- python爬取酷狗音乐返回值不正常
- python
- 3个回答
换一换