CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


ProcessorArchitecture

Prototype:

function ProcessorArchitecture: TSetupProcessorArchitecture;

Description:

Returns the native processor architecture of the current system.

TSetupProcessorArchitecture is defined as:

TSetupProcessorArchitecture = (paUnknown, paX86, paX64, paIA64);

Remarks:

A 64-bit processor architecture will never be returned on 32-bit versions of Windows. Hence, you cannot use this function to detect a 64-bit AMD CPU on a 32-bit version of Windows; you'll just get back paX86 if you try.

paUnknown is returned if Setup/Uninstall does not recognize the processor architecture. It can be assumed that an "unknown" architecture is at least capable of executing 32-bit code, or Setup/Uninstall wouldn't be running at all.

If one of the known 64-bit processor architectures is returned (paX64 or paIA64) and the architecture is not included in the value of the ArchitecturesInstallIn64BitMode [Setup] section directive, you should not assume that Inno Setup's 64-bit-only features are available -- for example, the {pf64} constant. Those features only work when IsWin64 returns True, and as documented, it may not return True on early versions of 64-bit Windows that lack certain APIs Inno Setup requires.

Therefore, instead of:

  if ProcessorArchitecture = paIA64 then
    // perform some Itanium-specific install task that
    // involves expanding {pf64}

you should additionally check that IsWin64 returns True:

  if ProcessorArchitecture = paIA64 then
  begin
    if IsWin64 then
      // perform some Itanium-specific install task that
      // involves expanding {pf64}
    else
      // cannot use 64-bit features; display an error message,
      // fail silently, try something else, etc.
  end;

If the processor architecture you are testing for is included in the value of the ArchitecturesInstallIn64BitMode [Setup] section directive, then it is not necessary to check IsWin64 because Setup will do so itself at startup, and fail with an error message (MissingWOW64APIs) if it is False.

Example:
begin
  case ProcessorArchitecture of
    paX86: S := 'x86';
    paX64: S := 'x64';
    paIA64: S := 'Itanium';
  else
    S := 'Unrecognized';
  end;
  MsgBox('Your processor architecture: ' + S, mbInformation, MB_OK);
end;
See also:

IsWin64
Is64BitInstallMode



You are reading help file online using chmlib.com

If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web