I am trying to do my first API call in VB. I am trying to do the GetLocalTime. I think that I have the module set up correctly, but I don't know how to call it. Below is my code, can any own help. It is telling me that the systemtime variable is not defined in MsgBox (GetLocalTime(systemtime)).
-Uncle Cake
MODULE:
Option Explicit
Public Declare Sub GetLocalTime Lib "kernel32" (lpSystemTime As systemtime)
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
FORM:
Private Sub Command1_Click()
MsgBox (GetLocalTime(systemtime))
End Sub
-Uncle Cake
MODULE:
Option Explicit
Public Declare Sub GetLocalTime Lib "kernel32" (lpSystemTime As systemtime)
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
FORM:
Private Sub Command1_Click()
MsgBox (GetLocalTime(systemtime))
End Sub