S
Shayne H
I cannot get the following function to work. A System.NullReferenceError
exception occurs when CopyMemory is executed. However, during debug I found
that none of the parameters passed are Null.
Is there a .NET way of doing this without using the CopyMemory API function?
Function ByteArrayToString(ByVal byteArray() As Byte, ByVal start As
Integer, ByVal length As Integer)
Dim temp As New String(Chr(0), length+1)
CopyMemory(temp, byteArray(start), length)
Return temp.ToString()
End Function
exception occurs when CopyMemory is executed. However, during debug I found
that none of the parameters passed are Null.
Is there a .NET way of doing this without using the CopyMemory API function?
Function ByteArrayToString(ByVal byteArray() As Byte, ByVal start As
Integer, ByVal length As Integer)
Dim temp As New String(Chr(0), length+1)
CopyMemory(temp, byteArray(start), length)
Return temp.ToString()
End Function