I would like to declare an external function from the kernel32.dll library whose name is GetTickCount64. As far as I know, it is detected only in Vista and in later versions of Windows. This means that when I define a function as follows:
function GetTickCount64: int64; external kernel32 name 'GetTickCount64';
Of course, I will not be able to start the application in previous versions of Windows due to an error that occurred when starting the application.
Is there a workaround to this problem? Say I would like to not include this function when it does not exist, and then use some replacement function in my code. How to do it? Are there any compiler directives that will help? I believe that the definition should be surrounded by such a directive, and I will also need to use some directives, wherever I use the GetTickCount64 function, right?
Your help will be appreciated. Thanks in advance.
Mariusz.
source share