[DCC Error] CnWizOptions.pas(530): E2033 Types of actual and formal var parameters must be identical
procedure TCnWizOptions.SetUseOneCPUCore(const Value: Boolean);
var
AMask, SysMask: Cardinal;
begin
FUseOneCPUCore := Value;
// if GetProcessAffinityMask(GetCurrentProcess, AMask, SysMask) then 这里报错了
if _GetProcessAffinityMask (GetCurrentProcess, AMask, SysMask) then 改用自己定义的
begin
if FUseOneCPUCore then
SetProcessAffinityMask(GetCurrentProcess, $0001)
else
SetProcessAffinityMask(GetCurrentProcess, SysMask);
end;
end;
直接在CnWizOptions开头定义
function _GetProcessAffinityMask(hProcess: THandle; out lpProcessAffinityMask, lpSystemAffinityMask: DWORD_PTR): BOOL; stdcall; 'kernel32.dll' name 'GetProcessAffinityMask';