LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay smaller then 1ms

The problem turns out to be the use of the static storage classifier (heap) on a LARGE_INTEGER.
 
This code fails with a GPF:
 
static LARGE_INTEGER lia;
          LARGE_INTEGER lib;
 
        
0 Kudos
Message 21 of 36
(2,826 Views)
The problem turns out to be the use of the static storage classifier (heap) on a LARGE_INTEGER.
 
This code fails with a GPF:
 
static LARGE_INTEGER lia;
          LARGE_INTEGER lib;
 
         
0 Kudos
Message 22 of 36
(2,827 Views)

How'd that happen? 

If there's a moderator watching this we need to delete the multiple copies of the message.

Sorry about that, chief.

Menchar

0 Kudos
Message 23 of 36
(2,817 Views)
Ciao a tutti,

su questo link http://groups.google.it/group/ILCVIG trovate la proposta italiana al forum della NI, che entro l'anno dovrebbe aprire anche un proprio sito con dominio.
Purtroppo è poco conosciuto e ci sono pochissimi post.
Spero che qualcuno di voi voglia contribuire.

Ciao Gianpaolo
0 Kudos
Message 24 of 36
(2,791 Views)
I am trying to use the QueryPerformanceCounter() and QueryPerformanceFrequency() to get the microsecond resolution I need for my application.  However, I can't seem to include "winbase.h" or "windows.h" in my application.  The compiler complains that the "LONG_PTR", along with many other variables / data-type is not defined.    Can someone give me an example of how I should start the source file?  Any information is greatly appreciated. 


GaryZ
0 Kudos
Message 25 of 36
(2,688 Views)

You will need to have the FDS version of CVI to use these SDK components. I don't recall having to tell CVI where to find windows.h on my system, but it is located (on my PC, at least) in ...CVI70\sdk\include . The #include <windows.h> statement should be the very first #include file in your source code.

JR

Message Edited by jr_2005 on 08-11-2006 10:04 AM

0 Kudos
Message 26 of 36
(2,684 Views)
I've added the #include <windows.h>  in the first line of my source code.  However, CVI 7.1 still complains about many things.  The following is an example of the error messages i received with the following in my source code.

This is all I have in my source code.

#include <windows.h>

int main()
{

 return 0;
}



This is a section of a big part of all the error messages I received from compiling the above code.  What am I missing or doing wrong?

 Test.c - 11 errors, 2 warnings
  "basetsd.h"(287,19)   syntax error; found 'identifier' expecting ';'.
  "basetsd.h"(287,25)   Warning: Empty declaration.
  "basetsd.h"(287,25)   syntax error; found ',' expecting ';'.
  "basetsd.h"(287,27)   Unrecognized declaration.
  "winnt.h"(211,16)   Warning: Empty declaration.
  "winnt.h"(279,14)   syntax error; found '*' expecting ';'.
  "winnt.h"(279,14)   Unrecognized declaration.
  "winbase.h"(2757,8)   Missing parameter type.
  "winbase.h"(2757,14)   syntax error; found 'identifier' expecting ')'.
  "winreg.h"(529,12)   Missing parameter type.
  "winreg.h"(529,20)   syntax error; found 'identifier' expecting ')'.
  "winreg.h"(538,12)   Missing parameter type.
  "winreg.h"(538,20)   syntax error; found 'identifier' expecting ')'.

0 Kudos
Message 27 of 36
(2,624 Views)

On my CVI 7.0, your source file compiles without error (as expected, of course). So there must be some anomaly with your workspace/project settings - can you post a screen shot (eg a zipped bitmap) of your workspace/project, with the source file open in it? This just might give us some more clues.

JR

0 Kudos
Message 28 of 36
(2,617 Views)
I've attached a copy of images taken from the CVI workspace project.  I've also included images taken from the option's menu.  Please let me know if you need any other information.  Thanks.

Gary Z.
0 Kudos
Message 29 of 36
(2,608 Views)

You need to have #include <windows.h> as the first line of your source code. Your screenshots show that you have #include "Winbase.h" before this line - this is the cause of your problems.

JR

0 Kudos
Message 30 of 36
(2,603 Views)