Function Byt(ByVal v as Integer) As Byte<br /> Return CByte(v and 255)<br />End Function<br /><br />Function HexArr(ByVal dat() as Byte) As String ' Returns hex representation of array<br /><br />Function ByteString(ByVal dat() as Byte, ByVal Length As Integer) As String ' Converts bytes to string (by character code)<br /><br />Sub Zap(ByRef it as iDisposable)<br /> Dim oldIt as iDisposable<br /> oldIt = it<br /> If oldIt IsNot Nothing then<br /> oldIt.Dispose<br /> Threading.Interlocked.CompareExchange(it, Nothing, oldIt)<br /> EndIf<br />End Sub
var