Sign in to follow this  
Followers 0
LostUser

Using DllCall to access GetTickCount

3 posts in this topic

Hey all. Trying to access the kernel32.dll function GetTickCount but can't seem to do it right. Here is the line of code I am using. I don't get an error but I don't get a visible value either. I just want to see the output to make sure I've got it right. I've done this with SMSInstaller.

The example on a link I found is for GetSystemTime but the format for that is different.

$getreboot = DllCall ("kernel32.dll","none","GetTickCount")
$STYLE=$WS_BORDER

GUICreate("GetTickCount",400,400)

GUICtrlCreateLabel($getreboot,16,8,300,24,$STYLE)

; GUI MESSAGE LOOP
GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Thanks


Be open minded but not gullible.A hammer sees everything as a nail ... so don't be A tool ... be many tools.

Share this post


Link to post
Share on other sites



Bah...this line works...

I didn't realize you had to access the string like $getreboot[0] rather than just $getreboot. I hadn't been using the [] brackets. So much time wasted. At least now I can continue.

$getreboot = DllCall ("kernel32.dll", "long", "GetTickCount")
$STYLE=$WS_BORDER

GUICreate("GetTickCount",400,400)

GUICtrlCreateLabel($getreboot[0],16,8,StringLen($getreboot[0])*7,17,$STYLE)

; GUI MESSAGE LOOP
GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Be open minded but not gullible.A hammer sees everything as a nail ... so don't be A tool ... be many tools.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0