如何读取文件的描述信息(文件说明)
如下图文件SGTool.exe,鼠标放上去会显示文件说明、公司、文件版本等信息,我想写代码获取 文件说明:搜狗输入法工具,这一项内容,请教大家,谢谢了https://attach.52pojie.cn/forum/202411/26/152853q8fejdty29wpty4a.png 可以问问GPT的,这样的GPT可以搞定。
但是GPT的我运行了一下,报错了,稍加改造。
import pefile
def get_exe_info(file_path):
pe = pefile.PE(file_path)
for entry in pe.FileInfo.StringTable.entries:
print(entry.decode(), "\t", pe.FileInfo.StringTable.entries.decode())
exe_file = r'D:\software\Tencent\QQNT\QQ.exe'
get_exe_info(exe_file)
运行结果:
CompanyName Tencent
FileDescription QQ
FileVersion 9.9.16.29927
InternalName QQ
LegalCopyright Copyright (C) 1999-2024 Tencent. All Rights Reserved
OriginalFilename
ProductName QQ
ProductVersion 9.9.16.29927-bf4701c1
SquirrelAwareVersion 1
zunmx 发表于 2024-11-26 16:04
可以问问GPT的,这样的GPT可以搞定。
但是GPT的我运行了一下,报错了,稍加改造。
哇,这么快就解决了,你真厉害,我查了好长时间都没查到,我也用文心一言之类的问过了,都不行,gpt厉害,你更厉害,谢谢你 还得是GPT啊{:1_921:},好在我只用GPT和Kimi:lol smallsinger629 发表于 2024-11-26 16:29
还得是GPT啊,好在我只用GPT和Kimi
Kimi 有点拉,但是对 ai 应用上的功能多一些。国内可以试试 DeepSeek 本帖最后由 durongze 于 2024-11-26 18:39 编辑
zunmx 发表于 2024-11-26 16:04
可以问问GPT的,这样的GPT可以搞定。
但是GPT的我运行了一下,报错了,稍加改造。
大佬我这个问题可以gpt不?
我这个是个cpp的工程编译不过。 有连接对应的库,但就是编译不过。
1. 直接把所有代码加载进去可以编译,见test_3rdlib,这个可以编过。
2.但编译成动态库就会报错,test_3rdlib_app 依赖 动态库 test_3rdlib_shared 。
链接: https://pan.baidu.com/s/1AHPhQ-33o3mtCbFPH418WA?pwd=4hrf 提取码: 4hrf
报错的工程是 test_3rdlib_app 和 test_3rdlib_shared。
-------------------------------------------------------------------------------------------
3:58:41:318 1>MSVCRTD.lib(init.obj) : error LNK2019: unresolved external symbol _CrtDbgReport referenced in function _CRT_RTC_INIT
13:58:41:318 1>MSVCRTD.lib(init.obj) : error LNK2019: unresolved external symbol _CrtDbgReportW referenced in function _CRT_RTC_INITW
13:58:41:318 1>MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z)
13:58:41:318 1>MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPEAXPEBD@Z)
13:58:41:318 1>MSVCRTD.lib(error.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l
13:58:41:318 1>MSVCRTD.lib(error.obj) : error LNK2001: unresolved external symbol __C_specific_handler_noexcept
13:58:41:318 1>MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol _wmakepath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
13:58:41:318 1>MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol _wsplitpath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
13:58:41:318 1>MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol wcscpy_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned __int64)" (?GetPdbDllPathFromFilePath@@YAHPEB_WPEA_W_K@Z)
13:58:41:318 1>MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_GetModuleFileNameW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ)
13:58:41:318 1>MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_GetModuleHandleW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ)
13:58:41:318 1>MSVCRTD.lib(pdblkup.obj) : error LNK2019: unresolved external symbol __vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPEAUHINSTANCE__@@XZ)
13:58:41:318 1>BuildSrc\Debug\test_3rdlib.dll : fatal error LNK1120: 17 unresolved externals
页:
[1]