python 调用 C dll dll中的函数需要传递字符串 将需要传递的字符串转换成字节的形式传给dll函数就行了 str = "abcdefg" DLL.FUNCTION( bytes("dataLog.txt", encoding='utf-8'))