New to VB.Net. Trying to port old code from VB6.

Public CHandles() As Long
Public SHandles() As Long
Public rerrors() As Long
Public itemvalues() As Object
Dim Str() As String

Once number of items is known:

ReDim SHandles(0 To itemcount)
ReDim rerrors(0 To itemcount)
ReDim CHandles(0 To itemcount)
ReDim Str(0 To itemcount)

In VB6, these were 1 to itemcount but VB.Net doesn't like this.

Now the following line:

g.OPCItems.AddItems(itemcount, Str, SHandles, CHandles, rerrors)

Generates a SafeArrayTypeMismatchException was unhandled.

Specified Array was not of the expected type error.

I assume it means the SHandles, rerrors, and CHandles arrays but not sure.

Tried to review and understand previous posts related to this problem but I cannot see my way through.

I am a EE with some programming experience. I am not an expert so please respond speaking slowly and using small words.

Thanks for any help you can provide.
Tom