I'm trying to develop an application to capture the input buffer to identify a device's input commands to build a user control that uses this commands for further use.
I'm actually developing a project that simulates Guitar Hero, and I want it to recognise the Guitar Hero Controller's input.
I know there are already several controls that work with the guitar hero controller. The thing is i MUST develop this control myself.
What i've done so far only recognises input from the keyboard using
Console.OpenStandardInput() . The thing is, as the class name says, it reads input from the Console... not from all sources possible, such as mouse, and other peripherals (joystick, and as i need it, Guitar Hero Controller)
Here's my code:
Sub Main() Dim Data As System.IO.Stream Dim buff(32) As Byte Dim buffOut() As Byte Data = Console.OpenStandardInput() 'Dim DataBuff As System.IO.BufferedStream 'DataBuff = System.IO.BufferedStream.Synchronized(Data) Using memoryStream As New System.IO.MemoryStream Dim count As Integer Do count = Data.Read(buff, 0, buff.Length) MsgBox(buff.GetValue(0)) memoryStream.Write(buff, 0, count) Loop While count <> 0 buffOut = memoryStream.ToArray() Debug.Print(buffOut.ToString()) End Using End Sub
I guess (since i don't really know) all i need is guidance towards the right input buffer to use for this purpose, since the Console Input Buffer is not working for me.
Thanks in advance!!