BobF
Tue May 16 11:04:44 CDT 2006
see
<
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_midioutopen.asp>
to find the port you want, you can do something similar to:
// get the number of MIDI out devices
m_midiOutCount = midiOutGetNumDevs();
// cycle through the available devices
// adding the names to a listbox for selection
MIDIOUTCAPS outCapStruct;
for (UINT i = 0; i < m_midiOutCount; i++)
{
midiOutGetDevCaps(i, &outCapStruct, sizeof(MIDIOUTCAPS));
m_OutCombo.AddString(outCapStruct.szPname);
}
Based on your stated goal, it doesn't sound to me like you need to create a
driver. If I have this wrong, please disregard :-)
On Tue, 16 May 2006 08:48:02 -0700, Avtoritet wrote:
> ´Ð ×ÝÐî ï, ÝÕ Ø×ÔÕÒÐÙáï, çâÞ íâÞ ÑàÕÔ. ·ÐÔÐÝØÕ ÝÐ ÚãàáÐç âÐÚÞÕ... :)
>
> I thought it would be easy to access sound card via kernel streaming. But
> reading DirectKS code, I understand that it is not so. Implementing the same
> with kernel-mode functions is not so fast... (Ð áàÞÚØ ßÞÔÖØÜÐîâ ÝÐäØÓ).
>
> May I create a Miniport driver like in src\wdm\audio\mpu401 sample with my
> custom IOCTL codes such as IOCTL_WRITE_MIDI? In this driver a can use some
> MiniportMidiStream:Write methods.
> Can I create a symbol link to such a driver like \\Device\\my_miniport_midi
> and use it in driver clients?
>
> "Maxim S. Shatskih" wrote:
>
>> Use a helper user app (started from the shell's Run key), which is turnable
>> off :-) there is nothing more annoying then the computer making some sounds
>> even without a logged on user :-)
>>
>> --
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> maxim@storagecraft.com
>>
http://www.storagecraft.com
>>
>> "Avtoritet" <Avtoritet.27vqhq@mail.codecomments.com> wrote in message
>> news:Avtoritet.27vqhq@mail.codecomments.com...
>>>
>>> I am a newbie in kernel-streaming topics and the drivers...
>>> All I need is to play a midi-note in windows kernel-mode. Like
>>> MidiOutShortMessage in WinAPI.
>>> Where can I read the manuals or examles? Must I use IMiniport
>>> interfaces or
>>> create complex streams? But how to use this IMiniport interfaces I
>>> don't
>>> understand completely.
>>> All I understand now is to find some PortMidi in system, create a new
>>> stream
>>> in his Mimiport and to write data. But I don't knpw how to find this
>>> Port. I
>>> think, there is no need in creating new port.
>>>
>>> Can you give me code-examples or even ready code? It is easier to
>>> understand
>>> topics with examples.
>>> I must implement this in coming days, it is my home task in university.
>>>
>>>
>>>
>>> --
>>> Avtoritet
>>> ------------------------------------------------------------------------
>>> Posted via
http://www.codecomments.com
>>> ------------------------------------------------------------------------
>>>
>>
>>