
Originally Posted by
LaVolpe
EdgeMeal, when not sure how many bytes a specific vartype is:
Neat. I know my MSDN help has that info in there, but mainly I wasn't sure about the sub I posted.
So if I wanted to do the same thing but for an array type of Doubles I can do it like this then... ?
Code:
Private Sub pvArrayRemoveDbl(ByRef alArray() As Double, ByVal lPos As Long)
Dim lUBound As Long
lUBound = UBound(alArray)
If Not (lPos = lUBound) Then
RtlMoveMemory VarPtr(alArray(lPos)), VarPtr(alArray(lPos + 1)), (lUBound - lPos) * 8
End If
ReDim Preserve alArray(lUBound - 1)
End Sub