LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

A very basic question on the interface to Win32 API

Hello all,

CVI comes with the interface to Win32 API that permits to use system functions in our applications.

Now the fact is that as far as I can understand, this support is targeted to some old OS version, which means some more recent functions cannot be used. Nevertheless, if properly configured, CVI can use even those "newer" functions.

Just as an example, GetLocaleInfoEx () function is declared for use on WIndows Vista and upper systems, and on native CVI install is not found by the compiler (I'm using CVI2012SP1 till now).

 

Now, I know I can add /DWINVER=_WIN32_WINNT_VISTA /D_WIN32_WINNT=WINVER /D_WIN32_WINDOWS=WINVER string to compiler defines in Build options and the program compiles and executes well (I'm using Win7 so I'm ok) but I wonder if such a define can alter other parts of the SDK and move to unpredictable results. Tests I have made so far show no problems, but the SDK is so huge and so rich of version-aware definitions and inclusions that I'm absolutely not sure of what I'm doing with this Smiley Surprised

 

Can anybody share his knowledge / experience on this matter? Can some NI expert shed some light on SDK universe?

 

Additionally, some info on the difference between the following macros, which address the same OS version, would be useful:

#define _WIN32_WINNT_WIN6     0x0600
#define _WIN32_WINNT_VISTA    0x0600
#define _WIN32_WINNT_WS08     0x0600
#define _WIN32_WINNT_LONGHORN 0x0600



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 1 of 2
(3,307 Views)

After digging in the forum I discovered some threads related to this arguments: I even participated in some of them but didn't remember it!

 

According to this post by LuisG, the SDK sets version to the highest version that supports all operating systems a CVI program can be run into. This means XP for CVI2012 I am using; for some reason, XP remained as the reference version even for newer CVI releases even if they don't support XP anymore.

It appears safe for developers to set the expected target OS release.

Another useful thread, specifically related to GetLocaleInfoEx, is this one: in my opinion it's worth the effort of reading it.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,295 Views)