       .Bounds(1).lLbound = 0
       .Bounds(1).cElements = BytesPerScanLine()
       .pvData = m_lPtr
   End With
   CopyMemory ByVal VarPtrArray(bDib()), VarPtr(tSA), 4

   ' random:
   Randomize Timer
    
   xEnd = Width - 1
   For y = 0 To m_tBI.bmiHeader.biHeight - 1
       For x = 0 To xEnd
           lC = Rnd * lColorMax
           bDib(x, y) = lC
       Next
   Next
    
   ' Clear the temporary array descriptor
   CopyMemory ByVal VarPtrArray(bDib), 0&amp;, 4
    
End Sub

Public Sub ClearUp()
   