sancarn / stdVBA

VBA Standard Library - A Collection of libraries to form a common standard layer for modern VBA applications.
MIT License
294 stars 58 forks source link

`stdEnumerator` compile error in 32 bit #36

Closed sancarn closed 3 years ago

sancarn commented 3 years ago
Private Declare PtrSafe Function createEmptyArrayLongLong Lib "oleaut32" Alias "SafeArrayCreateVector" (Optional ByVal vt As VbVarType = vbLongLong, Optional ByVal lLow As Long = 0, Optional ByVal lCount As Long = 0) As LongLong()

Will raise a compiler error in 32 bit.

Fix, change to:

#If Win64 Then
    Private Declare PtrSafe Function createEmptyArrayLongLong Lib "oleaut32" Alias "SafeArrayCreateVector" (Optional ByVal vt As VbVarType = vbLongLong, Optional ByVal lLow As Long = 0, Optional ByVal lCount As Long = 0) As LongLong()
#End If

Additionally

CreateFromListObject needs a test as it failed on first try. v needs to be vData

sancarn commented 3 years ago

Closed by fe11437