Hi everyone!
I am still converting this vb6 project.
I got to the following code:
[code] Dim fileNum As Integer
Dim fileLength As Integer
Dim bytes() As Byte
Dim data As Byte
Dim i As Integer
fileNum = FreeFile
Open “C:\ECONTROL\PKI\archivo.pfx” For Binary As fileNum
fileLength = LOF(fileNum)
ReDim bytes(fileLength)
i = 0
Do While Not EOF(fileNum)
Get fileNum, , data
bytes(i) = data
i = i + 1
Loop
Close fileNum[/code]
dim f as new folderItem ("C:\\ECONTROL\\PKI\\archivo.pfx", FolderItem.PathTypeAbsolute)
dim bs as BinaryStream = BinaryStream.Open(f)
dim mb as MemoryBlock = bs.Read( bs.Length() )
dim f as new folderItem (“C:\ECONTROL\PKI\archivo.pfx”, FolderItem.PathTypeAbsolute)
dim bs as BinaryStream = BinaryStream.Open(f)
dim mb as MemoryBlock = bs.Read( bs.Length() )
bs = nil
f = nil
dim bytes() as Byte
for i as integer = 0 to mb.Size-1
bytes.append mb.byte(i)
next