Here's something that I fried my brain on (I hate bit math). This even
shows the example of passing a structure to a Win API. Also note: This is
on NT/Win95. You might be able to use the same function in the 16 bit
world, but call it in Kernel instead of Kernel32.
******* Begin Code ***********
DECLARE SetLocalTime IN "kernel32.dll" STRING @Time
*------------------------------------------
* cMyTime Structure is as follows
*
* DWORD = 2 bytes
*
* DWORD Year
* DWORD Month
* DWORD Day Of Week (0 = Sunday)
* DWORD Day Of Month
* DWORD Hour
* DWORD Minute
* DWORD Second
* DWORD Millisecond
*------------------------------------------
cMyTime = ITOC(YEAR(DATE()))+ITOC(MONTH(DATE()))+ITOC(DOW(DATE())-1)
cMyTime = cMyTime+ITOC(DAY(DATE()))+ITOC(HOUR(DATETIME()))
cMyTime = cMyTime+ITOC(MINUTE(DATETIME()))+CHR(0)+CHR(0)+CHR(0)+CHR(0)
= SetLocalTime(@cMyTime)
FUNCTION ITOC
LPARAMETERS nNumber
cReturnString = CHR(MOD(nNumber, 256)) + CHR(INT(nNumber/ 256))
RETURN cReturnString
******* End Code ***********
-= Ken =-