LabWindows/CVI User Group Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI Tip: Using the Windows 8.1 SDK

Summary

The Windows 8.1 SDK upgrade came with a host of benefits to Windows developers and can be easily enabled for use with LabWindows/CVI. The upgrade provides new functions for handling processes and threads (e.g. SetProcessInformation/GetProcessInformation), an Operation Recorder to speed up repeated file accessing, and better virtual and physical memory handling.

Note: This tip will only work on machines running the Windows 8 operating system or newer

Contents

1. Enabling the Windows 8.1 SDK

2. Examples for Windows 8.1 SDK

Enabling the Windows 8.1 SDK


In order to use the new features from the SDK, two defines need to be added to the CVI project:

  • _WIN32_WINNT=_WIN32_WINNT_WIN8
  • WINVER=_WIN32_WINNT_WIN8

These can be added in the Options»Build Options»Compiler Defines field.

Screen Shot 2016-02-22 at 10.59.42 AM.png

Screen Shot 2016-02-22 at 10.58.53 AM.png

Examples for Windows 8.1 SDK

Two examples were shipped with LabWindows/CVI 2015 that show how to use the SDK functionality:

  • OperationRecorder.cws
    • Illustrates the use of the Windows SDK feature that allows sped up repeat file access operations.
  • SetProcessInfo.cws
    • Illustrates the use of the Windows SDK functions SetProcessInformation and GetProcessInformation for setting and retrieving the memory priority of a process.

Did you find this tip useful? Rate this document or add a comment below.

If you give this a try, share your experience! Add a comment below.

Collin D.
Software Product Manager
Comments
Srm27
Member
Member
on

Run Error.jpg

Hi,

Did as requested above but got this run error, what have I missed out?

I am running 64bit Windows 7

Thanks

carlox
Member
Member
on

You're using Windows 7, so it' absolutely normal you can NOT use any API

present only in newer versions of Windows.

Il 09/03/2016 10:32, Srm27 ha scritto:

>

NI Community <https://decibel.ni.com/content/index.jspa>

>

LabWindows/CVI Tip: Using the Windows 8.1 SDK

new comment by Srm27 <https://decibel.ni.com/content/people/Srm27>

View all comments on this document

<https://decibel.ni.com/content/docs/DOC-47015#comment-47973>

Carlo A.
Megaris




TheNIDragon
NI Employee (retired)
on

Hi Srm27,

carlox is right, because the entry point of the Windows DLL changed that the SDK was using, this specific tip only works with the Windows 8 operating system or newer. I should have clarified that in the description, my apologies!

Regards,

TheNIDragon

Collin D.
Software Product Manager
Contributors