I'm looking for a file named WinDos.PAS which is not available in Delphi XE2. It should be an old library (I开发者_如何学Go guess Delphi 1 or 2), but couldn't find anything yet...
A Google search gave this page as one of the first hits.
The functions in WinDos.pas were intended to invoke software interrupts and do various "DOS" era operating system functions. You don't need it.
All the functions in WinDos.h should be replaced with modern calls to functions in the RTL, including functions to access date and time. This unit was not dropped from XE2, or even XE, but has not been part of Delphi since version 2.0.
After removing the WinDos unit from the uses clause, as David said in a comment, you have two choices; Either implement your own helper functions, as a single line function:
function GetArgCount:Integer;
begin
result := ParamCount;
end;
Or, what would be even better, go find places where GetArgCount
is called and change it to just call the modern function ParamCount
. We call this "modernizing" your 16 bit era code. It's 2011. Time to update your code.
A friend of mine want to run this program on a 64bit system which gives out a failure that it can't execute it.... I thought that it was a 32bit program, but I'm not shure. is there any possibility to find this out?
If your program is compiled to use WinDos.pas
, then it is a 16-bit program. Since 64-bit versions of Windows do not support 16-bit programs natively, you will have to find another way.
- You could port the program from 16-bit to 32-bit, but that could be a lot of work.
- Your friend could install the so-called "Windows XP Mode" which is Microsoft's supported method of running old 16-bit programs on a 64-bit operating system.
精彩评论