HOWTO: Set the System TimeLast reviewed: July 14, 1997Article ID: Q154009 |
The information in this article applies to:
SUMMARYThe Win32 API offers the functionality to change the system time on the local machine. The change will take place immediately without the need for a reboot. Below is a code sample showing how to do this.
MORE INFORMATION
REFERENCESThe SYSTEMTIME Type structure is as follows:
WYear Integer-The current year. WMonth Integer-The current month. January is 1. WDayOfWeek Integer-The current day of the week. Sunday is 0. WDay Integer-The current day of the month. WHour Integer-The current hour. wMinute Integer-The current minute. wSecond Integer-The current second. wMilliseconds Integer-The current millisecond.To change the system time on a Win32 platform from 16-bit Visual Basic, you would have to create a DLL that does a generic thunk to the 32-bit API SetSystemTime. For more information, please see article Q104009 on the Microsoft Developer Network (MSDN) and the article outline in the Microsoft Systems Journal (MSJ) for June 1994. |
Keywords : kbusage PrgOther vb432 vb4win vb5all vb5howto kbhowto
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |