.Net DLL only accepts ByteArray(1 to 32)

  • Thread starter Thread starter Benjamin Lukner
  • Start date Start date
B

Benjamin Lukner

Hi!

I'm using a .Net DLL that's referenced in my project.
The strange thing is that the DLL vendor uses byte arrays of 32 bytes
length to read and write data that have a lower bound of 1!

The only way I've found to create such an array is

Dim aData As System.Array = _
System.Array.CreateInstance( _
GetType(System.Byte), _
New Integer() {32}, _
New Integer() {1})

Does anyone know a neater way to do it?


Kind regards,

Benjamin Lukner
 
Benjamin,

Benjamin Lukner said:
I'm using a .Net DLL that's referenced in my project.
The strange thing is that the DLL vendor uses byte arrays of 32 bytes
length to read and write data that have a lower bound of 1!

Mhm... Are you sure this is a .NET DLL?!
 
Herfried said:
Mhm... Are you sure this is a .NET DLL?!

Yes, I'm sure.
But it seems to be a very simple wrapper around a COM Control that can
be used with VB6. I don't know why the vendor decided to use an array
that begins at 1. And why building another wrapper instead of a "real"
DLL. You know, the COM Control itself is already a wrapper around the
base API DLL.

Benjamin
 

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

Back
Top