nsProcess在Unicode下找不到的解决办法

本文讲述了在NSI脚本中设置Unicode为true后遇到的编译错误,解决方法是将x86-ansi目录下的nsProcessW.dll移动至x86-unicode,并正确引用nsProcessW::_KillProcess。

在nsi脚本中设置了Unicode true

并且又使用了nsProcess::_KillProcess等相关函数,编译nsi的时候会报错

这个时候需要将x86-ansi目录下的nsProcessW.dll复制到x86-unicode目录下,

然后在nsi中nsProcessW::_KillProcess如此引用

***************************************************************** *** nsProcess NSIS plugin v1.0 *** ***************************************************************** 2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru) Source function FIND_PROC_BY_NAME based upon the Ravi Kochhar (kochhar@physiology.wisc.edu) code Thanks iceman_k (FindProcDLL plugin) and DITMan (KillProcDLL plugin) for direct me Features: - Find/kill a process by name - Kill all processes with specified name (not only one) - The process name is case-insensitive - Win95/98/ME/NT/2000/XP support - Small plugin size (4,5 Kb) **** Output variables **** .r0-.r9 == $0-$9 .R0-.R9 == $R0-$R9 **** Find process **** nsProcess::FindProcess "[file.exe]" .r0 "[file.exe]" - Process name (e.g. "notepad.exe") .r0 - $0=0 Success $0=603 Process was not currently running $0=605 Unable to load PSAPI.DLL $0=606 Unable to identify system type $0=607 Unsupported OS $0=700 Unable to get procedure address from PSAPI.DLL $0=701 Unable to get process list, EnumProcesses failed $0=702 Unable to load KERNEL32.DLL $0=703 Unable to get procedure address from KERNEL32.DLL $0=704 CreateToolhelp32Snapshot failed **** Kill process **** nsProcess::KillProcess "[file.exe]" .r0 "[file.exe]" - Process name (e.g. "notepad.exe") .r0 - $0=0 Success $0=602 Not all processes terminated successfully $0=603 Process was not currently running $0=604 No permission to terminate process $0=605 Unable to load PSAPI.DLL $0=606 Unable to identify system type $0=607 Unsupported OS $0=700 Unable to get procedure address from PSAPI.DLL $0=701 Unable to get process list, EnumProcesses failed $0=702 Unable to load KERNEL32.DLL $0=703 Unable to get procedure address from KERNEL32.DLL $0=704 CreateToolhelp32Snapshot failed
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

编程经验随笔

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值