Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > WINDOWS PROGRAMMING (NNTP) > How to create MIDI loopback driver
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 11th July 14:30
philippecailleau@gmailcom
External User
 
Posts: 1
Default How to create MIDI loopback driver


Hi!

I need help on how to create a MIDI loopback driver. I've spent a lot
of days on reading the DDK do***entation, and I have now a best view on
how midi streams are handled by midi port and miniport.

but....

I still did ot succeed to make my loopback driver.... I have made a
very basic adapter that install a midi miniport, but I've no idea on
how to install it in order to be seen as a virtual midi port... I miss
information on how to install this kind of driver since there is no
hardware behind.

Can you give me some help / sample code / architecture information /
anything else that could help me?

Many thanks in advance,

Philippe.
  Reply With Quote


  sponsored links


2 11th July 14:30
bobf
External User
 
Posts: 1
Default How to create MIDI loopback driver


I spent a couple of months going through this earlier this year.
Everything you need is in the DDK samples and docs.

In a nutshell, combine modified elements of the dmusuart and mpu401
samples.

I'll be happy to help with specific technical questions along the way if I
can.
  Reply With Quote
3 11th July 14:30
philippecailleau@gmailcom
External User
 
Posts: 1
Default How to create MIDI loopback driver


Hello BobF :-)

I just take a look on some of your messages on this newsgroup, and yes
indeed it seems I have the same problems you had in the past. I'll read
all your threads before coming back to you with more accurate
questions.

Thanks!

Philippe.
  Reply With Quote
4 11th July 14:30
philippecailleau@gmailcom
External User
 
Posts: 1
Default How to create MIDI loopback driver


Well, I've now compiled a piece of code embedding modified versions of
DMusUart and MPU401. I get a .sys file, so I guess nothing is wong
within this code.

I've made a very simple INF to just try to install the driver... and I
can't go further... When I try to install the INF file, I get the
following error:
"The class installer has denied the request to install or upgrade this
device"

Can you help me to find what's wrong within my INF?

Here is the content:


[Version]
Signature="$CHICAGO$"
Class=MEDIA
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
provider="MyCompany"
DriverVer=01/01/2006,1.0.0.0

[SourceDisksNames.x86]
1="MyDevice WDM Driver Disk",,,

[SourceDisksFiles.x86]
MyDevice.sys=1,,

[ControlFlags]
; Mechanism for excluding drivers from the "Add New Hardware" list.

;-----------------------------------------------------------------------------
; Table of Contents: manufacturer, then devices. (INF Manufacturer
section)
;-----------------------------------------------------------------------------
[Manufacturer]
"MyCompany"=MyCompany

;-----------------------------------------------------------------------------
; The devices (INF Models section)
;-----------------------------------------------------------------------------
[MyCompany]
"WDM Driver for MyDevice"=MyDevice,*MYDEVICE,

;-----------------------------------------------------------------------------
; How to install the WDM driver on NT (INF DDInstall section)
;-----------------------------------------------------------------------------
[MyDevice.NT]
DriverVer=01/01/2006, 1.0.0.0
CopyFiles=MyDevice.sys

;-----------------------------------------------------------------------------
; How to start the WDM driver on NT
;-----------------------------------------------------------------------------
[MyDevice.NT.Services]
AddService=MyDevice, 2, MyDevice.AddService

[MyDevice.AddService]
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\MyDevice.sys
  Reply With Quote
5 11th July 14:30
bobf
External User
 
Posts: 1
Default How to create MIDI loopback driver


This INF file is incomplete and has some things you should check out.
For example, you need to check your version (depending on target OS) and
you don't have Addreg or Interfaces sections.

Check out the INF files for the SB16 and MSVAD samples, particularly the
MIDI portions.

Also see:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/DevInst_d/hh/DevInst_d/create-inf_fce26502-79c2-4d9e-a53f-c1ed84cdb5a5.xml.asp>

---------
  Reply With Quote
6 11th July 14:30
philippecailleau@gmailcom
External User
 
Posts: 1
Default How to create MIDI loopback driver


Many thanks :-)

After 4 or 5 tries, I succeeded to install the driver :-)))

Great great great! ;-)

But now, I'm facing a new error... "The device cannot start (Code
10)"....

Within the driver's properties tab, I can see the Multimedia devices
with a simple "1 branch tree" root "MIDI Devices and Instruments" and a
child node "WDM-base device". Asking for the properties of this child,
a WDM-base device properties dialog opens, telling me "status: driver
is enabled and functionning properly"...

So I guess my miniport is correctly instantiated, but something goes
wrong elsewhere.... ***sigh***
  Reply With Quote
7 11th July 14:30
bobf
External User
 
Posts: 1
Default How to create MIDI loopback driver


I think when you figure out what error StartDevice is returning and why,
you'll be a happy MIDI camper!
  Reply With Quote
8 11th July 14:30
philippecailleau@gmailcom
External User
 
Posts: 1
Default How to create MIDI loopback driver


Hello :-)

Well, still there with my virtual midi driver.... My driver is now able
to be installed, then start, add a device, create the miniport, init
the miniport, register the subdevice... all of this works fine.... BUT
I STILL DO NOT SEE ANY VIRTUAL MIDI PORT :-(((

Argghhh!!!!!

Well, I'm pretty sure there is something wrong within my INF file. I've
3 AddInterface within the DDInstall.Interfaces section (related to
KSCATEGORY_AUDIO, KSCATEGORY_RENDER and KSCATEGORY_CAPTURE), each of
them points to a WDM.Interface.UART section where it seems that I have
to setup some registry keys.

But I don't understand wich registry keys I have to setup and which
values I have to assign to these keys...

Can you show me the right way? ;-)

Thanks, thanks, thanks, and more :-)
  Reply With Quote
9 11th July 14:30
bobf
External User
 
Posts: 1
Default How to create MIDI loopback driver


If you want to share your INF, I'll be happy to see if there are
recommendations I can make.
  Reply With Quote
10 11th July 14:30
philippecailleau@gmailcom
External User
 
Posts: 1
Default How to create MIDI loopback driver


Thanks you very much :-)

Here is my INF file. The registry stuff is an average of what I've
found in different audio cards INF files...

The driver is visible within the "Sound, video etc..." section from the
Device Manager, and when I open the driver's properties dialog, I have
an extra "Properties" tag named "WDM-based Device"... so it seems the
[MyDevice.AddReg] section does at least a subset of what it should
do...

[Version]
Signature="$CHICAGO$"
Class=MEDIA
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
provider="MyCompany"
DriverVer=01/01/2006,1.0.0.0

[SourceDisksNames]
1="MyDevice WDM Driver Disk",,,

[SourceDisksFiles]
MyDevice.sys=1,,

;-----------------------------------------------------------------------------
; Table of Contents: manufacturer, then devices. (INF Manufacturer
section)
;-----------------------------------------------------------------------------
[Manufacturer]
"MyCompany1"=MyCompany

;-----------------------------------------------------------------------------
; The devices (INF Models section)
;-----------------------------------------------------------------------------
[MyCompany]
"MyDevice chip WDM driver3"=MyDevice,*MyDevice,

;-----------------------------------------------------------------------------
; How to install the WDM driver (INF DDInstall section)
;-----------------------------------------------------------------------------
[MyDevice]
CopyFiles=MyDevice.CopyList
AddReg=MyDevice.AddReg

;-----------------------------------------------------------------------------
; How to start the WDM driver (INF DDInstall.Interfaces section)
;-----------------------------------------------------------------------------
[MyDevice.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_UART%,WDM_ MyDevice.Interface.UART
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_UART%,WDM _MyDevice.Interface.UART
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_UART%,WD M_MyDevice.Interface.UART

[WDM_MyDevice.Interface.UART]
AddReg=WDM_MyDevice.Interface.UART.AddReg
[WDM_MyDevice.Interface.UART.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%WDM_MyDevice.UART.szPname%

;-----------------------------------------------------------------------------
; How to start the WDM driver (INF DDInstall.Services section)
;-----------------------------------------------------------------------------
[MyDevice.Services]
AddService=MyDevice, 0x00000002, MyDevice_Service_Inst

[MyDevice_Service_Inst]
DisplayName = "MyDevice Driver Service"
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\MyDevice.sys

[MyDevice.AddReg]
HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,MyDevice.sys
HKR,,NTMPDriver,,"MyDevice.sys"

HKR,Drivers,SubClasses,,"midi"

HKR,Drivers\midi\wdmaud.drv,Driver,,wdmaud.drv
HKR,Drivers\midi\wdmaud.drv, Description,,%WDM_MIDI%


[MyDevice.CopyList]
MyDevice.sys

[DestinationDirs]
MyDevice.CopyList = 10,system32\drivers ;
%SystemRoot%\system32\drivers

[Strings]
KSNAME_UART="MyDevice UART"
WDM_MyDevice.UART.szPname="MyDevice MPU-401"
WDM_MIDI="WDM-based Device"
Proxy.CLSID="{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
KSCATEGORY_AUDIO="{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_RENDER="{65E8773E-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666