Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. GetLastInputInfo error

GetLastInputInfo error

Scheduled Pinned Locked Moved C / C++ / MFC
help
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pryabu
    wrote on last edited by
    #1

    Hi all, To detect the application idle time,im using GetLastInputInfo function, but its not returning any values in the structure LASTINPUTINFO. It is showing the following error in Watch tool. But the program was build successfully. Error:symbol "li" not found. Im using the following code: LASTINPUTINFO li; li.cbSize = sizeof(LASTINPUTINFO); ::GetLastInputInfo(&li); Thanks,

    _ N K 3 Replies Last reply
    0
    • P Pryabu

      Hi all, To detect the application idle time,im using GetLastInputInfo function, but its not returning any values in the structure LASTINPUTINFO. It is showing the following error in Watch tool. But the program was build successfully. Error:symbol "li" not found. Im using the following code: LASTINPUTINFO li; li.cbSize = sizeof(LASTINPUTINFO); ::GetLastInputInfo(&li); Thanks,

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      See Here[^]. Are you including windows.h or winuser.h in your code?

      I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

      P 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        See Here[^]. Are you including windows.h or winuser.h in your code?

        I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

        P Offline
        P Offline
        Pryabu
        wrote on last edited by
        #3

        I have included winuser.h

        1 Reply Last reply
        0
        • P Pryabu

          Hi all, To detect the application idle time,im using GetLastInputInfo function, but its not returning any values in the structure LASTINPUTINFO. It is showing the following error in Watch tool. But the program was build successfully. Error:symbol "li" not found. Im using the following code: LASTINPUTINFO li; li.cbSize = sizeof(LASTINPUTINFO); ::GetLastInputInfo(&li); Thanks,

          N Offline
          N Offline
          Niklas L
          wrote on last edited by
          #4

          A watch window will only show the value of a variable if you halt the debugger where the variable is in scope. If it's out of scope (or undefined) the error message will appear.

          home

          1 Reply Last reply
          0
          • P Pryabu

            Hi all, To detect the application idle time,im using GetLastInputInfo function, but its not returning any values in the structure LASTINPUTINFO. It is showing the following error in Watch tool. But the program was build successfully. Error:symbol "li" not found. Im using the following code: LASTINPUTINFO li; li.cbSize = sizeof(LASTINPUTINFO); ::GetLastInputInfo(&li); Thanks,

            K Offline
            K Offline
            KingsGambit
            wrote on last edited by
            #5

            You can check the return value of GetLastInputInfo() to see if the function call was successful. You can also use TRACE to show the values inside li on output window.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups