[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: calling GetTickCount():kernel32.dll?



PureBytes Links

Trading Reference Links

At 01:26 PM 02/07/02, you wrote:
>I have the code:
>
>DefineDLLFunc: "kernel32.dll", long, "GetTickCount", long;
>
>vars: tickcount(0);
>
>tickcount = gettickcount(0);
>
>print("d=", date, " t=", time, " tc=", tickcount);
>
>but it gets an error within TS6. How do I easily call this function?
>I know the function returns a DWORD, but when I define the function
>above as using a DWORD instead of a long it also fails.
>
>Mike

GetTickCount doesn't take an argument.

Use this:

DefineDLLFunc: "kernel32.dll", long, "GetTickCount";

vars: tickcount(0);

tickcount = GetTickCount;

print("d=", date, " t=", time, " tc=", tickcount);