Jump to content

error C3861: 'QueryUnbiasedInterruptTime': identifier not found

- - - - -

  • Please log in to reply
5 replies to this topic

#1
alirezan

alirezan

    Learning Programmer

  • Members
  • PipPipPip
  • 62 posts
Hi
I'm trying to use QueryUnbiasedInterruptTime function and I think I include all the required headers and everything but for some reason I can't get it to work.
I am using windows 7 and Visual Studio 2008. Here is my code:


#include <windows.h>


#include <stdio.h>

#include <string.h>

#include <sstream>


#define _WIN32_WINNT 0x0601


void main (void) {

  

        LARGE_INTEGER interr;   // For converting tick into real time

	QueryUnbiasedInterruptTime (&interr);

        printf("Interrupt Time: %d\n", interr);

}

Anyone any idea why?

Thanks

Edited by dargueta, 28 April 2011 - 10:28 PM.
Please use [code][/code] tags next time.


#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,719 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Found this on the MSDN article:

Quote

To compile an application that uses this function, define _WIN32_WINNT as 0x0601 or later. For more information, see Using the Windows Headers.
That's the only reason I can think of right now.
sudo rm -rf /

#3
alirezan

alirezan

    Learning Programmer

  • Members
  • PipPipPip
  • 62 posts

dargueta said:

Found this on the MSDN article:

That's the only reason I can think of right now.


Yup that's why i have: #define _WIN32_WINNT 0x0601 in the code. That works right?

#4
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,719 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Is this all of your code?
sudo rm -rf /

#5
alirezan

alirezan

    Learning Programmer

  • Members
  • PipPipPip
  • 62 posts

dargueta said:

Is this all of your code?

Yes the first code I posted as part of original code is all of my code. Is there something missing?

Thank you

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,719 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Try this:

...


void main (void) {

        [COLOR="RED"][B]ULONGLONG[/B][/COLOR] interr;   // For converting tick into real time

	QueryUnbiasedInterruptTime (&interr);

        printf("Interrupt Time: %d\n", interr);

}


sudo rm -rf /




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users