PORTS Forum

Ports and Interfaces => USB => Topic started by: Clemzky on October 14, 2011, 02:45:16 am

Title: GenericHid VB.Net
Post by: Clemzky on October 14, 2011, 02:45:16 am
Hi,
      I am new to programming USB thing and trying to learn it by EXAMPLE using the sample source code GenericHid VB.Net, the program was successfully read the device using the "Exchange Features Reports".  When using the "Exchange Input and Output Reports" with "Use Control Transfers Only" there was no error but no data being read but when using "Exchange Input and Output Reports" the error arises in line "tmrReadTimeout.Start()" and the error is "Object reference not set to an instance of an object. Thank you in advance for any help or comments. Please see attached screenshots.

Best regards,

Clem

[attachment deleted by admin]
Title: Re: GenericHid VB.Net
Post by: Jan Axelson on October 14, 2011, 10:16:03 am
tmrReadTimeout.Start starts the timer created with

tmrReadTimeout = New System.Timers.Timer(5000)

Verify that the timer was created and that this is the line of code causing the error.

Jan