I need to convert a VB String Data type to a VB Byte array. This works great in VB6 but I am struggling in VB 2008. I have another post addressing this issue (http://www.experts-exchange.com/Programming/Languages/.NET/Q_26901478.html#a35214746
if I am unsuccessful there my fall back plan is to create a VB6 DLL that does the conversion and passes the resultant BYTE array back to VB 2008.
I have created the DLL in VB6 (see attached code). I have referenced this DLL in my VB 2008 project. However, when I try to assign the VB6 Byte array to the VB 2008 Byte Array I receive the following error message:
"Value of type 'Byte' cannot be converted to a '1-dimensional array of Byte'
How do I pass an Byte array from VB 6 to VB 2008? Is my VB6 Class constructed properly to do this?
Public Property Get s() As String
s = pstrS
Public Property Let s(ByVal strS As String)
pstrS = strS
Public Property Get ba() As Byte
ba = pba
Public Property Let ba(ByVal pba As Byte)
pba = ba
Public Sub ConvertStoBa()
pba = StrConv(pstrS, vbFromUnicode)