vc++ CRC-16 checksum to vb.net beta 2005, need help

What is wrong with the following vb.net 2005 beta version code?, need help

vc++ working condition

// CRC-16 checksum
unsigned short CRCChecksum (unsigned char *pData, unsigned short uSize)
{
unsigned short uCrc;
unsigned short uCount;

for (uCrc = 0, uCount = 0; uCount < uSize; uCount++, pData++)
uCrc = (unsigned short) (m_CRCTable[((uCrc >> 8) & 255) ^ (*pData)] ^ (uCrc << 8));
return uCrc;
}

Convert to vb.net beta 2005

Dim uCrc As Integer
Dim uCount As Integer
Dim i As Integer

uCrc = 0
uCount = 0
uCount = uSize
For i = 1 To uCount
uCrc = CShort(CRCTable(((uCrc >> 8) & 255) ^ (Asc(Mid(Data, i, 1))) ^ (uCrc << 8)))
Next i
Return uCrc

[1001 byte] By [VCBeginer] at [2008-2-25]
# 1
Locked, because of duplicate.
rgerbig at 2007-9-9 > top of Msdn Tech,.NET Development,64-Bit .NET Framework Development....

.NET Development

Site Classified