@@ -52,35 +52,37 @@ Private Declare Function utc_pclose Lib "libc.dylib" Alias "pclose" (ByVal utc_F
52
52
Private Declare Function utc_fread Lib "libc .dylib " Alias "fread " (ByVal utc_Buffer As String , ByVal utc_Size As Long , ByVal utc_Number As Long , ByVal utc_File As Long ) As Long
53
53
Private Declare Function utc_feof Lib "libc .dylib " Alias "feof " (ByVal utc_File As Long ) As Long
54
54
55
- Private Type utc_ShellResult
56
- utc_Output As String
57
- utc_ExitCode As Long
58
- End Type
59
-
60
- #ElseIf Win32 Then
55
+ #ElseIf VBA7 Then
61
56
62
57
' http://msdn.microsoft.com/en-us/library/windows/desktop/ms724421.aspx
63
58
' http://msdn.microsoft.com/en-us/library/windows/desktop/ms724949.aspx
64
59
' http://msdn.microsoft.com/en-us/library/windows/desktop/ms725485.aspx
65
- Private Declare Function utc_GetTimeZoneInformation Lib "kernel32 " Alias "GetTimeZoneInformation " _
60
+ Private Declare PtrSafe Function utc_GetTimeZoneInformation Lib "kernel32 " Alias "GetTimeZoneInformation " _
66
61
(utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION ) As Long
67
- Private Declare Function utc_SystemTimeToTzSpecificLocalTime Lib "kernel32 " Alias "SystemTimeToTzSpecificLocalTime " _
62
+ Private Declare PtrSafe Function utc_SystemTimeToTzSpecificLocalTime Lib "kernel32 " Alias "SystemTimeToTzSpecificLocalTime " _
68
63
(utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION , utc_lpUniversalTime As utc_SYSTEMTIME , utc_lpLocalTime As utc_SYSTEMTIME ) As Long
69
- Private Declare Function utc_TzSpecificLocalTimeToSystemTime Lib "kernel32 " Alias "TzSpecificLocalTimeToSystemTime " _
64
+ Private Declare PtrSafe Function utc_TzSpecificLocalTimeToSystemTime Lib "kernel32 " Alias "TzSpecificLocalTimeToSystemTime " _
70
65
(utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION , utc_lpLocalTime As utc_SYSTEMTIME , utc_lpUniversalTime As utc_SYSTEMTIME ) As Long
71
66
72
67
#Else
73
68
74
- Private Declare PtrSafe Function utc_GetTimeZoneInformation Lib "kernel32 " Alias "GetTimeZoneInformation " _
69
+ Private Declare Function utc_GetTimeZoneInformation Lib "kernel32 " Alias "GetTimeZoneInformation " _
75
70
(utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION ) As Long
76
- Private Declare PtrSafe Function utc_SystemTimeToTzSpecificLocalTime Lib "kernel32 " Alias "SystemTimeToTzSpecificLocalTime " _
71
+ Private Declare Function utc_SystemTimeToTzSpecificLocalTime Lib "kernel32 " Alias "SystemTimeToTzSpecificLocalTime " _
77
72
(utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION , utc_lpUniversalTime As utc_SYSTEMTIME , utc_lpLocalTime As utc_SYSTEMTIME ) As Long
78
- Private Declare PtrSafe Function utc_TzSpecificLocalTimeToSystemTime Lib "kernel32 " Alias "TzSpecificLocalTimeToSystemTime " _
73
+ Private Declare Function utc_TzSpecificLocalTimeToSystemTime Lib "kernel32 " Alias "TzSpecificLocalTimeToSystemTime " _
79
74
(utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION , utc_lpLocalTime As utc_SYSTEMTIME , utc_lpUniversalTime As utc_SYSTEMTIME ) As Long
80
75
81
76
#End If
82
77
83
- #If Win32 Or Win64 Then
78
+ #If Mac Then
79
+
80
+ Private Type utc_ShellResult
81
+ utc_Output As String
82
+ utc_ExitCode As Long
83
+ End Type
84
+
85
+ #Else
84
86
85
87
Private Type utc_SYSTEMTIME
86
88
utc_wYear As Integer
@@ -104,15 +106,19 @@ Private Type utc_TIME_ZONE_INFORMATION
104
106
End Type
105
107
106
108
#End If
107
- ' ===
109
+ ' === End VBA-UTC
108
110
109
111
#If Mac Then
110
- #ElseIf Win64 Then
112
+ #ElseIf VBA7 Then
113
+
111
114
Private Declare PtrSafe Sub json_CopyMemory Lib "kernel32 " Alias "RtlMoveMemory " _
112
115
(json_MemoryDestination As Any , json_MemorySource As Any , ByVal json_ByteLength As Long )
116
+
113
117
#Else
118
+
114
119
Private Declare Sub json_CopyMemory Lib "kernel32 " Alias "RtlMoveMemory " _
115
120
(json_MemoryDestination As Any , json_MemorySource As Any , ByVal json_ByteLength As Long )
121
+
116
122
#End If
117
123
118
124
' ============================================= '
@@ -676,7 +682,7 @@ Private Function json_BufferToString(ByRef json_buffer As String, ByVal json_Buf
676
682
#End If
677
683
End Function
678
684
679
- #If Win64 Then
685
+ #If VBA7 Then
680
686
Private Function json_UnsignedAdd (json_Start As LongPtr , json_Increment As Long ) As LongPtr
681
687
#Else
682
688
Private Function json_UnsignedAdd (json_Start As Long , json_Increment As Long ) As Long
@@ -692,7 +698,7 @@ Private Function json_UnsignedAdd(json_Start As Long, json_Increment As Long) As
692
698
End Function
693
699
694
700
''
695
- ' VBA-UTC v1.0.0
701
+ ' VBA-UTC v1.0.1
696
702
' (c) Tim Hall - https://github.com/VBA-tools/VBA-UtcConverter
697
703
'
698
704
' UTC/ISO 8601 Converter for VBA
0 commit comments