Hallo leute,
gibts es in C/C++ ein Funktion, um abzufragen,
wann der Rechner das letzte mal gebootet hat,
und wann der User angemeldet habe?
Hallo leute,
gibts es in C/C++ ein Funktion, um abzufragen,
wann der Rechner das letzte mal gebootet hat,
und wann der User angemeldet habe?
Hallo,
gibts es in C/C++ ein Funktion, um abzufragen,
wann der Rechner das letzte mal gebootet hat,
und wann der User angemeldet habe?
In C/C++ gibt es so etwas nicht, das sind Informationen des Betriebssystems.
In Windows gibt es zumindest einen Timer, welcher die Zeit seit dem letzten boot angibt. Musst halt mal in deiner Win-API Dokumentation nachsehen.
MfG Peter(TOO)
Nachtrag
Hallo,
timeGetTime
The timeGetTime function retrieves the system time, in milliseconds. The system time is the time elapsed since Windows was started.
DWORD timeGetTime(VOID);
Parameters
This function does not take parameters.
Return Values
Returns the system time, in milliseconds.
Remarks
The only difference between this function and the timeGetSystemTime function is that timeGetSystemTime uses the MMTIME structure to return the system time. The timeGetTime function has less overhead than timeGetSystemTime.
Note that the value returned by the timeGetTime function is a DWORD value. The return value wraps around to 0 every 2^32 milliseconds, which is about 49.71 days.This can cause problems in code that directly uses the timeGetTime return value in computations, particularly where the value is used to control code execution. You should always use the difference between two timeGetTime return values in computations.
Windows NT: The default precision of the timeGetTime function can be five milliseconds or more, depending on the machine. You can use the timeBeginPeriod and timeEndPeriod functions to increase the precision of timeGetTime. If you do so, the minimum difference between successive values returned by timeGetTime can be as large as the minimum period value set using timeBeginPeriod and timeEndPeriod. Use the QueryPerformanceCounter and QueryPerformanceFrequency functions to measure short time intervals at a high resolution,
Windows 95: The default precision of the timeGetTime function is 1 millisecond. In other words, the timeGetTime function can return successive values that differ by just 1 millisecond. This is true no matter what calls have been made to the timeBeginPeriod and timeEndPeriod functions.
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mmsystem.h.
Import Library: Use winmm.lib.
MfG Peter(TOO)
Login Time?
Hallo,
Nach dem ich herrausgefunden habe, dass man
winmm.lib in Projekteinstellungen/Linker einbinden
und nicht im code, hat es auch funktioniert.
ich bin eben ein anfänger. Danke für den Tip.
Mir fehlt noch dasselbe mit dem Login!
Vielleicht hast du auch da ein Idee.
…
Hallo,
Nach dem ich herrausgefunden habe, dass man
winmm.lib in Projekteinstellungen/Linker einbinden
und nicht im code, hat es auch funktioniert.
ich bin eben ein anfänger. Danke für den Tip.Mir fehlt noch dasselbe mit dem Login!
Vielleicht hast du auch da ein Idee.
Nöö, da hab ich keine Idee.
MfG Peter(TOO)