If WinTypes and WinProcs units are absent in Delphi

Alias to the project: WinProcs=Windows WinTypes=Windows
WinTypes and WinProcs units are absent in Delphi 2 and higher.

WinTypes.pas and WinProcs.pas are units from Windows 3.1x., they come from Turbo Pascal and Delphi 1.
In Win9x and later they were replaced with Windows.pas.


First solution to add an alias to the project: WinProcs=Windows, and WinTypes=Windows.
Delphi admits some aliases. For example, aliases for backwards compatibility from WinProcs and WinTypes to Windows.
The full string with conditional compilation directives may be sush as WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;

Second solution is to use in code conditional compilation directives for various Delphi versions.

{$IF CompilerVersion >= 9.0} // Delphi 2 and higher Windows, {$ELSE} WinTypes, WinProcs, {$IFEND}
Remaking old components for Delphi
Переделывая старые компоненты для Delphi

No comments:

Post a Comment