function ApplyPathRedirRules(const A64Bit: Boolean; const APath: String; const ATargetProcess: TPathRedirTargetProcess): String;
Applies system path redirection to the specified path and returns the rewritten path.
Before rewriting, the path is expanded using ExpandFileName and converted to an extended-length path (also known as a super path).
Path expansion and conversion to extended-length path always occurs, even if nothing is rewritten.
TPathRedirTargetProcess is defined as:
TPathRedirTargetProcess = (tpCurrent, tpNativeBit, tp32Bit, tp32BitPreferSystem32);
ApplyPathRedirRulesForCurrentProcess
PathConvertSuperToNormal