Hi,
I need to send specific amount of bits to a device and the Function requires that I provide the Bit Count and the Byte Count. Note that you can not always get exact match of the Bit Count to the Byte Count because Bytes are in 8-bits. So I used the following calculations as an example
NumberOfBits = 200
NumberOFBytes = NumberOfBits / 8 + 1 'Note this translates into 26 Bytes total
When I send these parameters to the function I get error "System.AccessViolationException" . This method worked fine in VB6 and and in Python. I reduced the byte count to be 25 and it still gave the same error. Howere if I reduce it to 24 the then the function is executed but get error back from the function saying "NUMBER_BYTES_TOO_SMALL".
Any solutions ???