LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows SDK Functions in LabWindows/CVI

We are using LabWindows Ver 6. Regarding windows functions the help
file says...

You can call Windows SDK Functions in LabWindows/CVI. If you install
the LabWindows/CVI full development system from CD-ROM, you can call
all the Windows SDK functions. Otherwise, you can call only a subset
of the Windows SDK functions.

So my question is, what is the subset of the Windows SDK functions
that may be called without installing the LabWindows/CVI full
development system? In otherwords I need a list of what those subset
functions are.

Thanks
0 Kudos
Message 1 of 4
(3,760 Views)
The SDK functions you can call are limited to a subset only because the base CVI only includes a few of the SDK import libraries. The libraries included you will find in \Program Files\National Instruments\MeasurementStudio\CVI\sdk\lib.

If you have MS VC++ installed, and VC++ compiler support selected in CVI, then you have access to all the SDK functions as you can use the import libraries (and header files, if necessary) from the VC++ installation.

Alternatively, you can download the Windows Platform SDK from microsoft.com for free and then once again you will have access to all the SDK functions.

HTH, HAND,
Martin.
--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 4
(3,760 Views)
One thing to note is that the Windows SDK that is shipped with CVI is customized to work with an ANSI C compiler, in terms of the data types (64 bit integers, CVI does not support them), inline assembly, etc.... So if you download the SDK from Microsoft, that would not work with CVI.

To installed the SDK support for CVI, you basically need to start the installer again (its not enabled by default), and then select the option from the feature tree. This is different from installing CVI support for VC, which basically allows you to import CVI project into Visual studio.

You can opened up the windows.h header to see the functions that are prototyped in there.


Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 3 of 4
(3,760 Views)
Another item of interest I uncovered is using TestStand which calls an IVI driver built using CVI, which internally uses SDK file IO functions like (fopen()/ fgets()/...

On the 1st iteration through the test, the file IO works 100% but on sunsequent passes, even the though the file opens OK returning a valid FILE* handle, all accesses to the file will hang. Teststand then needs to be killed manually, and the whole cycle repeats itself.

I found that using the CVI file handler functions (FileOpen, ReadFile(), ReadLine(),..) works 100%.

rjmiller
0 Kudos
Message 4 of 4
(3,760 Views)