Passing Two-dimensional to API declare

this code now is work like chame

Dim bmpData( - 1 , - 1 ) As Byte
Dim Siz As Integer = 1
Dim X As Integer = UBound( bmpData , 1 ) + Siz
Dim Y As Integer = UBound( bmpData , 2 ) + Siz
Dim mb As New MemoryBlock( X * Y )

For Row As Integer = 0 To X - Siz
For Column As Integer = 0 To Y - Siz
Dim Offset As Integer = ( Column * X ) + Row
mb.Byte( Offset ) = bmpData( Row , Column )
Next Column
Next Row

thanks to Norman Palardy & Tim Hare