Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002
    Location
    São Paulo, Brazil
    Posts
    16

    Talking Unanswered: OS Type during compile time

    Hi all,

    I would like to know the OS type (Win 2K or Win XP) during the compile time. In my case, I have a procedure that runs in Windows 2000 and in Windows XP differently, and this procedure cannot compile in the other OS.

    Example: I develop a procedure that only can compile and run in Windows XP. If I am developing in a Windows 2000 desktop and try to compile it, it gave me an error message.

    Thanks in advance,

    Marcelo Muzilli
    UIN 1572797

  2. #2
    Join Date
    Nov 2002
    Location
    Ohio
    Posts
    90
    You can use the following to conditionally compile:

    #If (yourcondition) Then

    Else

    #End If

    (yourcondition) must equate to a boolean True/False.

    I don't know how to detect the operating platform during compilation, only during execution using the SysInfo control or API calls.

    Good Luck,
    Bruce Baasch

  3. #3
    Join Date
    Dec 2002
    Location
    São Paulo, Brazil
    Posts
    16
    Originally posted by Bruce A. Baasch
    You can use the following to conditionally compile:

    #If (yourcondition) Then

    Else

    #End If

    (yourcondition) must equate to a boolean True/False.

    I don't know how to detect the operating platform during compilation, only during execution using the SysInfo control or API calls.

    Good Luck,
    Thank you for your quick response, but via API call I know too. In my case, I need to write a code during the compilation. Using API call, when I compile the code, the Delphi compiler doesn't care if I'm running in the Win2k or WinXP.

    I need to cut some line of code for Win2k or WinXP.

    Regards,

    Muzilli
    UIN 1572797

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •