您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

是否可以使用Python访问GetLongPathName()Win32 API?

是否可以使用Python访问GetLongPathName()Win32 API?

使用ctypespython标准中可用的方法,而无需使用pywin32 API。像这样:

from ctypes import *

buf = create_unicode_buffer(260)
GetLongPathName = windll.kernel32.GetLongPathNameW
rv = GetLongPathName(path, buf, 260)
print buf.value

来自http://mail.python.org/pipermail/python- win32/2008-January/006642.html

python 2022/1/1 18:33:37 有216人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶