
"Bad DLL Calling Convention"
HELP!
I get a runtime error 49 (Bad DLL Calling Convention) when this code is run,
but I don't know how to fix it:
Private 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
Private Type TZI
Bias As Long
StandardName As String * 32
StandardDate As SystemTime
StandardBias As Long
DaylightName As String * 32
DaylightDate As SystemTime
DaylightBias As Long
End Type
Public Declare Function GetTimeZoneInformation Lib "Kernel32.dll"
(LPTIMEZONEINFORMATION As TZI) As Long
Public Function SmtpSend() As Boolean
MainForm.Winsock.LocalPort = 0
Retn = GetTimeZoneInformation(TimeZone)
Bias = " -" & Replace(Right(Str(Int(TimeZone.Bias / 60)), 2), " ", "0")
_
& Replace(Right(Str(TimeZone.Bias - (Int(TimeZone.Bias / 60) *
60)), 2), " ", "0")
Dim CurDate As String
CurDate = Format(Date, "Ddd") & ", " & Format(Date, "dd Mmm YYYY") _
& " " & Format(Time, "hh:mm:ss") & Bias
Retn = MsgBox(CurDate)
SmtpSend = True
End Function ' <------ERROR OCCURS HERE