forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


GetTickCount API

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jul 23, 2003 9:02 pm    Post subject: GetTickCount API Reply with quote

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
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Jul 23, 2003 10:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Jul 24, 2003 9:38 am    Post subject: Reply with quote

I just rebooted my computer:

Quote:
Windows was started: 263721314773.92 Minutes Ago.


Confused

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu Jul 24, 2003 10:38 am    Post subject: Reply with quote

Skit3000 wrote:
I just rebooted my computer:

Quote:
Windows was started: 263721314773.92 Minutes Ago.


Confused


Time flies, right! Laughing Laughing

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
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Jul 24, 2003 10:41 am    Post subject: Reply with quote

What kind of value did you get? Rolling Eyes
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu Jul 24, 2003 11:35 am    Post subject: Reply with quote

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
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jul 24, 2003 12:54 pm    Post subject: Reply with quote

Thanks SnarlingSheep! Very Happy

It returned "Windows was started: 5.31 Minutes Ago." which it just about
the time when it started. Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Thu Jul 24, 2003 2:41 pm    Post subject: Reply with quote

That's a nice one! Could be very handy... Smile
_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sun Jul 27, 2003 12:34 am    Post subject: Re: GetTickCount API Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Jul 27, 2003 1:11 pm    Post subject: Reply with quote

OK. Thanks, I didn't know that. Very Happy
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group