Maestro Usc GetSettings Error

I have added some lines to the MaestrEsayExampleVb application to get and set Settings. When I make the call to GetSettings I get an error (MaestroError.jpg attached).

Here is my modification to the TrySetTarget function:

Sub TrySetTarget(ByVal channel As Byte, ByVal target As UInt16)
    Dim UscS As UscSettings
        Using device As Usc = connectToDevice() ' Find a device and temporarily connect.
            UscS = device.getUscSettings()<font color="#FF0000"> 'THIS CALL CAUSES THE EXCEPTION</font>                UscS.channelSettings(channel).mode = ChannelMode.Output
            device.setUscSettings(UscS, False)

            device.setTarget(channel, target)
            ' device.Dispose() is called automatically when the "Using" block ends,
            ' allowing other functions and processes to use the device.
        End Using
    Catch exception As Exception  ' Handle exceptions by displaying them to the user.
    End Try
End Sub


Certain methods that you call in the Usc class depend on another library we provide called Bytecode.dll, which is referred to in your error message. Could you try going into Visual Studio and adding a reference to Maestro/Bytecode.dll, which comes with the Pololu USB SDK? If I recall correctly, the Solution Explorer pane shows all the references for your project and you can add one by right-clicking in the right place.


That seems to have helped. Thanks.