Click here to Skip to main content
15,918,268 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ File properties Pin
bugDanny1-Aug-05 5:09
bugDanny1-Aug-05 5:09 
GeneralRe: C++ File properties Pin
Marc Soleda1-Aug-05 3:44
Marc Soleda1-Aug-05 3:44 
GeneralRe: C++ File properties Pin
bugDanny1-Aug-05 5:26
bugDanny1-Aug-05 5:26 
GeneralRe: C++ File properties Pin
Marc Soleda1-Aug-05 5:38
Marc Soleda1-Aug-05 5:38 
GeneralRe: C++ File properties Pin
bugDanny1-Aug-05 7:11
bugDanny1-Aug-05 7:11 
GeneralRe: C++ File properties Pin
Blake Miller1-Aug-05 7:47
Blake Miller1-Aug-05 7:47 
GeneralRe: C++ File properties Pin
Marc Soleda1-Aug-05 19:42
Marc Soleda1-Aug-05 19:42 
GeneralUsing GetLastInputInfo() from user32.lib Pin
dmtwpi211-Aug-05 2:47
dmtwpi211-Aug-05 2:47 
I'm a newbie to C, C++, and the Visual C++ IDE. I'm trying to call the GetLastInputInfo() function that is in user32.lib, but I can't seem to get off the ground. I tried adding the user32.lib to the project but that hasn't helped. Any help getting the code to compile (and explanation) would be appreciated. Thanks! I'm using Visual Studio.net 2003.

The MSDN documentation says this about GetLastInputInfo:
--------------------------------------------------------
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 2000


The code I have now in my .cpp file is:

#include "stdafx.h"
#include <stdio.h>
#include <windows.h>
#include "Winuser.h"

typedef struct LASTINPUTINFO {
UINT cbSize;
DWORD dwTime;
} LASTINPUTINFO, *PLASTINPUTINFO;


int _tmain(int argc, _TCHAR* argv[])
{
printf("hello");
LASTINPUTINFO myinfo;
BOOL result = GetLastInputInfo(&myinfo);
return 0;
}

The error I'm getting now is:
'GetLastInputInfo': identifier not found, even with argument-dependent lookup
GeneralRe: Using GetLastInputInfo() from user32.lib Pin
David Crow1-Aug-05 3:00
David Crow1-Aug-05 3:00 
GeneralRe: Using GetLastInputInfo() from user32.lib Pin
dmtwpi211-Aug-05 8:25
dmtwpi211-Aug-05 8:25 
GeneralRe: Using GetLastInputInfo() from user32.lib Pin
David Crow1-Aug-05 9:17
David Crow1-Aug-05 9:17 
GeneralRe: Using GetLastInputInfo() from user32.lib Pin
dmtwpi211-Aug-05 16:23
dmtwpi211-Aug-05 16:23 
GeneralRe: Using GetLastInputInfo() from user32.lib Pin
David Crow2-Aug-05 2:47
David Crow2-Aug-05 2:47 
GeneralRe: Using GetLastInputInfo() from user32.lib Pin
dmtwpi212-Aug-05 5:07
dmtwpi212-Aug-05 5:07 
GeneralRe: Using GetLastInputInfo() from user32.lib Pin
David Crow2-Aug-05 5:27
David Crow2-Aug-05 5:27 
GeneralRe: Using GetLastInputInfo() from user32.lib Pin
dmtwpi213-Aug-05 1:47
dmtwpi213-Aug-05 1:47 
GeneralCreate Random number Pin
Halawlaws1-Aug-05 1:44
Halawlaws1-Aug-05 1:44 
GeneralRe: Create Random number Pin
toxcct1-Aug-05 1:55
toxcct1-Aug-05 1:55 
GeneralRe: Create Random number Pin
Halawlaws1-Aug-05 2:00
Halawlaws1-Aug-05 2:00 
GeneralRe: Create Random number Pin
Eytukan1-Aug-05 2:26
Eytukan1-Aug-05 2:26 
GeneralRe: Create Random number Pin
Halawlaws1-Aug-05 2:29
Halawlaws1-Aug-05 2:29 
GeneralRe: Create Random number Pin
Maximilien1-Aug-05 2:26
Maximilien1-Aug-05 2:26 
GeneralRe: Create Random number Pin
Halawlaws1-Aug-05 2:28
Halawlaws1-Aug-05 2:28 
GeneralRe: Create Random number Pin
Maximilien1-Aug-05 2:30
Maximilien1-Aug-05 2:30 
GeneralRe: Create Random number Pin
Halawlaws1-Aug-05 2:32
Halawlaws1-Aug-05 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.