Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
System Date
Message
 
 
À
05/03/2000 15:10:55
Information générale
Forum:
Visual Basic
Catégorie:
Fonctions API de Windows
Titre:
Divers
Thread ID:
00341904
Message ID:
00341916
Vues:
24
>I need an example for get and change system date by windows api
>
Declare Function SetLocalTime Lib "kernel32" (lpSystemTime As SYSTEMTIME) As Long

Type SYSTEMTIME
   wYear As Integer
   wMonth As Integer
   wDayOfWeek As Integer
   wDay As Integer
   wHour As Integer
   wMinute As Integer
   wSecond As Integer
   wMilliseconds As Integer
End Type

' Set SYSTEMTIME structure with new time
lpSystemTime.wYear = 2000
lpSystemTime.wMonth = 3
lpSystemTime.wDayOfWeek = 1
lpSystemTime.wDay = 5
lpSystemTime.wHour = 16
lpSystemTime.wMinute = 0
lpSystemTime.wSecond = 0
lpSystemTime.wMilliseconds = 0
lReturn = SetLocalTime(lpSystemTime)
Now will give you the current date.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform