If I write
Code: Select all
Call Profile.Series(0).AddArray(mValuesCount, mLastProfileValues)
Converting the unsigned integers to longs is not really an option (quite slow).
TIA
Code: Select all
Call Profile.Series(0).AddArray(mValuesCount, mLastProfileValues)
Have you read the article on:How can I force TeeChart to draw a graph with unsigned integer values in Visual Basic 6?
Have you tried passing unsigned integer arrays to TeeChart's AddArray()That's why I posted the question to know if it is possible to let TeeChart Control interprete the array of integers as unsigned integers.
Mmm, in this case, I'm afraid, you will have to make the conversion before passing the values to the TeeChart Control.If I pass the array to the TeeChart Control, the control plots them signed.
So, if I have a value of say 33000, it is plotted -233, 32800 becomes -33.
Code: Select all
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
Private Function UIntArray2Long(uintArray() As Integer) As Long()
Dim lngArray() As Long, lBnd As Long, uBnd As Long, lElem As Long
On Error Resume Next
lBnd = LBound(uintArray)
uBnd = UBound(uintArray)
On Error GoTo 0
If lBnd = 0 And uBnd = 0 Then Exit Function
ReDim lngArray(lBnd To uBnd) As Long
For lElem = lBnd To uBnd
CopyMemory lngArray(lElem), uintArray(lElem), 2
Next lElem
UIntArray2Long = lngArray
End Function