If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > OS Type during compile time

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-31-03, 11:27
Muzilli Muzilli is offline
Registered User
 
Join Date: Dec 2002
Location: São Paulo, Brazil
Posts: 16
Talking 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
Reply With Quote
  #2 (permalink)  
Old 01-31-03, 13:28
Bruce A. Baasch Bruce A. Baasch is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 01-31-03, 13:41
Muzilli Muzilli is offline
Registered User
 
Join Date: Dec 2002
Location: São Paulo, Brazil
Posts: 16
Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On