5

I want to create a virtual MIDI loopback cable program that creates virtual MIDI ports to interconnect applications on Windows that want to open hardware-MIDI-ports for communication.

SOrry if I am not clear in my requirements, here is an example application that does what I intend to do.

http://www.tobias-erichsen.de/loopMIDI.html

How do I go about this? Any tips or pointers are greatly appreciated.

ashwnacharya
  • 14,601
  • 23
  • 89
  • 112

2 Answers2

1

After many nights of searching, the best way I have found is to actually use Tobias Erichsen's driver.

His driver works quite well, and if you e-mail him, he will provide you with the API necessary.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • His driver works perfectly for that matter. I just wanted to know how it works, and if possible, code it myself using C# for the learning experience. – ashwnacharya Jun 29 '11 at 15:17
  • @ashwnacharya, writing a driver in C# isn't possible. Please see Hans' answer to this question: http://stackoverflow.com/questions/3954552/ddk-hello-world – Brad Jun 29 '11 at 15:24
  • FWIW, I am open to doing a lot of PInvokes and DLLImports if that's what it takes. – ashwnacharya Jun 29 '11 at 15:38
  • 2
    @ashwnacharya, sure, but you can't create a driver with PInvoke. http://msdn.microsoft.com/en-us/windows/hardware/gg463268 – Brad Jun 29 '11 at 15:43
  • 4
    @ashwnacharya: I have to side with Brad. Though the problem isn't really the language, but the structure/contents of the resulting binary and its dependendies. First of all drivers don't have a subsystem set in the PE header. Secondly, they don't depend on any Win32 binaries. Since .NET is based in the Win32 subsystem it will simply fail at this point already. Besides, driver development takes a whole lot of foresight and insight. One does not simply walk into kernel mode without preliminary knowledge. Please take no offense, but your comments make it obvious that you lack that knowledge. – 0xC0000022L Jul 05 '11 at 20:17
  • No offense taken. I would be the first person to admit that I am clueless when it comes to driver development. Just exploring to see if there is anything I can do. – ashwnacharya Jul 06 '11 at 08:55
  • 1
    On Windows 7 x64 the TE driver won't work for me. Tried changing group policy on unsigned drivers too but nop not functional. It errors. I suspect the driver signing problem is to blame. – MistereeDevlord Mar 19 '14 at 15:12
  • 2
    As an outsider to this problem: how can the answer be that only one man knows the answer? How did he learn about it? – Dan Rosenstark Jul 14 '15 at 20:16
1

Not really an answer, but this link had some sound advice on how to get started. Leaving this here in case anyone else is also interested. http://www.osronline.com/article.cfm?article=20#Q25

ashwnacharya
  • 14,601
  • 23
  • 89
  • 112