Skip to content

Commit f10e554

Browse files
committed
Merge pull request #12 from VBA-tools/compile-error
Resolve 64-bit compile error
2 parents c78448c + 5b984f9 commit f10e554

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

JsonConverter.bas

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,37 @@ Private Declare Function utc_pclose Lib "libc.dylib" Alias "pclose" (ByVal utc_F
5252
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
5353
Private Declare Function utc_feof Lib "libc.dylib" Alias "feof" (ByVal utc_File As Long) As Long
5454

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
6156

6257
' http://msdn.microsoft.com/en-us/library/windows/desktop/ms724421.aspx
6358
' http://msdn.microsoft.com/en-us/library/windows/desktop/ms724949.aspx
6459
' 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" _
6661
(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" _
6863
(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" _
7065
(utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION, utc_lpLocalTime As utc_SYSTEMTIME, utc_lpUniversalTime As utc_SYSTEMTIME) As Long
7166

7267
#Else
7368

74-
Private Declare PtrSafe Function utc_GetTimeZoneInformation Lib "kernel32" Alias "GetTimeZoneInformation" _
69+
Private Declare Function utc_GetTimeZoneInformation Lib "kernel32" Alias "GetTimeZoneInformation" _
7570
(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" _
7772
(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" _
7974
(utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION, utc_lpLocalTime As utc_SYSTEMTIME, utc_lpUniversalTime As utc_SYSTEMTIME) As Long
8075

8176
#End If
8277

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
8486

8587
Private Type utc_SYSTEMTIME
8688
utc_wYear As Integer
@@ -104,15 +106,19 @@ Private Type utc_TIME_ZONE_INFORMATION
104106
End Type
105107

106108
#End If
107-
' ===
109+
' === End VBA-UTC
108110

109111
#If Mac Then
110-
#ElseIf Win64 Then
112+
#ElseIf VBA7 Then
113+
111114
Private Declare PtrSafe Sub json_CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
112115
(json_MemoryDestination As Any, json_MemorySource As Any, ByVal json_ByteLength As Long)
116+
113117
#Else
118+
114119
Private Declare Sub json_CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
115120
(json_MemoryDestination As Any, json_MemorySource As Any, ByVal json_ByteLength As Long)
121+
116122
#End If
117123

118124
' ============================================= '
@@ -676,7 +682,7 @@ Private Function json_BufferToString(ByRef json_buffer As String, ByVal json_Buf
676682
#End If
677683
End Function
678684

679-
#If Win64 Then
685+
#If VBA7 Then
680686
Private Function json_UnsignedAdd(json_Start As LongPtr, json_Increment As Long) As LongPtr
681687
#Else
682688
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
692698
End Function
693699

694700
''
695-
' VBA-UTC v1.0.0
701+
' VBA-UTC v1.0.1
696702
' (c) Tim Hall - https://github.com/VBA-tools/VBA-UtcConverter
697703
'
698704
' UTC/ISO 8601 Converter for VBA

specs/VBA-JSON - Specs.xlsm

-8.99 KB
Binary file not shown.

0 commit comments

Comments
 (0)