开发者

Using Ctypes to wrap .LIB files

开发者 https://www.devze.com 2023-04-06 14:53 出处:网络
I need to control a device in python using Ctypes. However, the lib开发者_运维百科raries that come with the device are compiled .LIB files, not .DLLs. Is it still possible to use Ctypes?No. Not direct

I need to control a device in python using Ctypes. However, the lib开发者_运维百科raries that come with the device are compiled .LIB files, not .DLLs. Is it still possible to use Ctypes?


No. Not directly anyway. CTypes uses the dynamic linker (LoadLibrary, GetProcAddress) to work. You could wrap the LIB file in your own DLL possibly, but you won't be able to use Ctypes directly with the lib file.

0

精彩评论

暂无评论...
验证码 换一张
取 消