title: Declaring external functions depending on whether they exist
body: <p>I would like to declare an external function from the kernel32.dll library whose name is GetTickCount64. As far as I know, it is defined only in Vista and in later Windows versions. This means that when I define the function as follows:</p>
  
  <pre><code>function GetTickCount64: int64; external kernel32 name 'GetTickCount64';
  </code></pre>
  
  <p>I will certainly not be able to run my application on previous versions of Windows because of error generated on application startup.</p>
  
  <p>Is there a workaround to that problem? Let's say I would like not to include that function when it does not exist and then use some substitute function in my code. How to do that? Are there any compiler directives that would help? 
  I gues the definition would have to be surrounded by such directive and I would also have to use some directives wherever I use the GetTickCount64 founction, right?</p>
  
  <p>Your help will be appreciated. Thanks in advance.</p>
  
  <p>Mariusz.</p>