0

is it possible to tap into the USB drivers / resources with a windows console app (win32 c++)?

i would like to detect connected hardware, send and receive midi from my USB keyboard. but i don't want to build a complete GUI app for my small needs to test my own hardware on perf board. the main purpose is also to test the software written for the pic microcontroller, it's much faster debugging, rather than compiling and running with the chip from zif socket tot zif socket.

i need some directions, thank you.

NaturalDemon
  • 934
  • 1
  • 9
  • 21
  • 1
    A GUI or the console have nothing to do with USB. You can use USB from any program, provided you have the correct libraries. The interface to the program you write can be anything you want - GUI, console, nothing... – Steve Apr 22 '15 at 16:10
  • thanks, what is the correct library to connect with the Edirol pcr-300 keyboard? or what library do i need. where or @ what should i start looking – NaturalDemon Apr 22 '15 at 16:12
  • 1
    Unfortunately, asking for recommendations for libraries or tools or such is off-topic on Stack Overflow. A Google search could help you. I found another post on SO that answers that very question, though: http://stackoverflow.com/questions/12036077/usb-api-for-windows – Steve Apr 22 '15 at 16:14
  • thnx, i'll use that info and give a try. i did't know where to start. – NaturalDemon Apr 22 '15 at 16:17
  • [A good place to start for nearly everything.](https://www.google.com/) – Steve Apr 22 '15 at 16:20
  • @Steve: That's a worst-case library. Sure, it can handle pretty much any hardware, because it leaves all the details to you. You generally would prefer the Roland PCR driver, which knows that a PCR-300 is a MIDI keyboard (i.e. instrument). – MSalters Apr 22 '15 at 19:15

1 Answers1

1

This is possible. For midi keyboards, check the midiIn... functions

MSalters
  • 173,980
  • 10
  • 155
  • 350
  • bummer, now i need to learn how to use it. [midi reference](https://msdn.microsoft.com/en-us/library/dd757277(v=vs.85).aspx) – NaturalDemon Apr 22 '15 at 20:27