tags:

views:

14

answers:

1

Hello, I am using NI LabWindows CVI 8.1 to compile and build a executable program which I need to run on either Windows XP and Windows 2000 OS. I use Windows XP to compile and build the executable. The info I have so far is that I need to place some statement as follows:

ifdef (windows xp)

then specify path as C:\WINDOWS\system32

elif (windows NT)

then specify path as C:\WINNT\system32

endif

I need to know what is the exact syntax and where to place it (like which header or source file to place it)

Thanks in advance for your help.

dm

+2  A: 

Here's how to call APIs:

http://zone.ni.com/reference/en-XX/help/371361F-01/lvexcodeconcepts/ex%5F3%5Fcall%5Fthe%5Fwin32%5Fapi/

Then, try GetSystemDirectory:

http://msdn.microsoft.com/en-us/library/ms724373%28VS.85%29.aspx

Stu
Indeed—do not hard code `C:` anything! I don't have a single system with the default directory. For example, the most used system has the system directory `E:\WINNT55SP2\SYS32`.
wallyk