ryan chan
June 2nd, 1999, 03:01 AM
How to use the winapi32 function GetSystemTime in VB?
public Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime as SYSTEMTIME)
public 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
Sub main()
Dim d as SYSTEMTIME
GetSystemTime (d)
MsgBox sp
End Sub
There is a compilation error when i run it
Compile error:
Variable required - can't assign to this expression
please help
Thanks!
public Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime as SYSTEMTIME)
public 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
Sub main()
Dim d as SYSTEMTIME
GetSystemTime (d)
MsgBox sp
End Sub
There is a compilation error when i run it
Compile error:
Variable required - can't assign to this expression
please help
Thanks!