String to Byte()

J

jamie

try using the system.bitconverter class.

good luck
jamie


-----Original Message-----
I am trying to get past a simple error that I am
recieving when attempting to use a valid VB6 class in
VB.Net
my code is as follows:

in VB6

Public Function putN(ByVal str, buffer As Variant, dec As Long) As Boolean
putN = False
Dim Strb() As Byte
Dim e As Long
Dim i As Long
e = UBound(buffer)

Strb = str
For i = e To 0 Step -1
buffer(i) = Strb(i * 2)
Next
putN = True
End Function

In VB.Net it is:

Public Function putN(ByVal str As String, ByRef
buffer As Object, ByVal dec As Long) As Boolean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top