MickTheBelgian
Programmer
I try to get a pointer to a localtime. VB says I use the wrong kind of arguments. (err 49, bad calling convention)What do I do wrong? Original C++ function included as comment:
Private Const ExampleTime_t As Long = 1035655310
Private Declare Function LocalTime Lib "MSVCRT.DLL" Alias "localtime" (ByRef GMT As Long) As Long
'struct tm *cdecl localtime (const time_t *ptime)
Private Sub Command1_Click()
Dim pt As Long 'pointer
pt = LocalTime(ExampleTime_t)
MsgBox pt
End Sub
Private Const ExampleTime_t As Long = 1035655310
Private Declare Function LocalTime Lib "MSVCRT.DLL" Alias "localtime" (ByRef GMT As Long) As Long
'struct tm *cdecl localtime (const time_t *ptime)
Private Sub Command1_Click()
Dim pt As Long 'pointer
pt = LocalTime(ExampleTime_t)
MsgBox pt
End Sub