| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Jul 23, 2003 9:02 pm Post subject: GetTickCount API |
|
|
How can I get this API result into useful information:
| Code: | LOADLIB kernel32.dll
# Use @VAL() because the result is DWORD
%A = @val(@lib(kernel32,GetTickCount,INT:))
info %A
FREELIB kernel32.dll |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Jul 23, 2003 10:39 pm Post subject: |
|
|
Try this out:
| Code: |
LOADLIB kernel32.dll
%A = @lib(kernel32,GetTickCount,INT:)
info Windows was started: @FORMAT(@FDIV(@FDIV(%A,1000),60),.2) Minutes Ago.
FREELIB kernel32.dll
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu Jul 24, 2003 10:38 am Post subject: |
|
|
| Skit3000 wrote: | I just rebooted my computer:
| Quote: | | Windows was started: 263721314773.92 Minutes Ago. |
 |
Time flies, right!
Well, Sheep's example works just fine on my XP Home box...
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu Jul 24, 2003 11:35 am Post subject: |
|
|
I get a plain integer: 3641516 (millisecs). Converted to minutes it adds up to about 60, and
that the correct time since I booted.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Jul 24, 2003 12:54 pm Post subject: |
|
|
Thanks SnarlingSheep!
It returned "Windows was started: 5.31 Minutes Ago." which it just about
the time when it started.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Thu Jul 24, 2003 2:41 pm Post subject: |
|
|
That's a nice one! Could be very handy...  _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Jul 27, 2003 12:34 am Post subject: Re: GetTickCount API |
|
|
| FreezingFire wrote: | How can I get this API result into useful information:
| Code: | LOADLIB kernel32.dll
# Use @VAL() because the result is DWORD
%A = @val(@lib(kernel32,GetTickCount,INT:))
info %A
FREELIB kernel32.dll |
|
I don't think it should be needed to use @VAL() even if the result is a DWORD value. |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Jul 27, 2003 1:11 pm Post subject: |
|
|
OK. Thanks, I didn't know that.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
|