FrameExtent seems to be wrong. Try this instead. kd> dt 0x840c0f98 KSSTREAM_HEADER -r1 +0x000 Size : 0x30 +0x004 TypeSpecificFlags : 0 +0x008 PresentationTime : +0x000 Time : 234196706 +0x008 Numerator : 1 +0x00c Denominator : 1 +0x018 Duration : 0 +0x020 FrameExtent : 0xc +0x024 DataUsed : 0xc +0x028 Data : 0x840c0ff0 +0x02c OptionsFlags : 0 kd> dd 0x840c0ff0 840c0ff0 00000000 00000003 000000b0 e5e5e5e5 kd> dt 0x840c0ff0 KSMUSICFORMAT +0x000 TimeDeltaMs : 0 +0x004 ByteCount : 3 Alper Selcuk This posting is provided "AS IS" with no warranties, and confers no rights. -----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Ben Allison Sent: Friday, November 05, 2004 8:19 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] writing to a midi pin in user-mode Hi, I'm fairly new to kernel streaming. I am trying to write code to output midi to a midi device (in this case, the Microsoft GS Wavetable Synth). I've successfully queried all the devices, opened the filter to the device, identified the midi pin, and gotten a handle to the pin it from KsCreatePin. (my KSDATAFORMAT after KSPIN_CONNECT has a subtype of MIDI, not directmusic) However, I can't seem to write to it. I get the error "The supplied user buffer is not valid for the requested operation". I'm passing a KSSTREAM_HEADER with the following: Size = 48 TypeSpecificFlags = 0 PresentationTime = Time=0 Numerator = 1 Denominator = 1 Duration = 0 FrameExtent = 36 DataUsed = 12 Data = (16 byte aligned pointer) OptionsFlag = 0 my data is just a simple midi message KSDATAFORMAT_MUSIC header: TimeStampMs = 0 Bytes = 3 (data following) = 4 bytes, 0x00404090 (note on, note 64, velocity 64, 0 padding) I'm passing in an OVERLAPPED for getting signalled later. What am I doing wrong? Why is DeviceIoControl rejecting my buffer? -Ben Allison ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/ ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/