Thanks Dogbert. It's good to know it wasn't a case of me doing something fundamentally stupid. I've checked AllocateContiguousPagesForMdl() on the RC version of Vista SP2 and it works fine in that, so hopefully it's just a glitch in the Windows 7 beta that will be corrected in the next update.
Jeff----- Original Message ----- From: "Dogbert" <dogber1@xxxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx> Sent: Monday, March 16, 2009 4:09 AMSubject: [wdmaudiodev] Re: IPortWaveRTStream::AllocateContiguousPagesForMdl problem in Windows 7
Hi, I'm having similar issues on Windows 7 (build 7048, x86): AllocateContiguousPagesForMdl() returns NULL for most of the time to the effect that STATUS_INSUFFICIENT_RESOURCES has to be returned for IMiniportWaveRTStream::AllocateAudioBuffer(). This renders my audio driver unusable in Windows 7. The peculiar thing is that AllocateContiguousPagesForMdl() fails no matter if the size parameter passed to the function is larger or lower than the page size. As a workaround, I tried to fiddle around with AllocatePagesForMdl() which works fine for every size. Since my hardware is from the stone age and doesn't support scatter-gather tables, I lowered the size parameter to the size of a single page so as to avoid fragmentation. This value seems to be rejected by the audio engine because IMiniportWaveRTStream::FreeAudioBuffer() is called almost directly after this size is returned by IMiniportWaveRTStream::AllocateAudioBuffer(). Is there something that I am missing here or is this indeed a bug which I happened to stumble upon? dogbert ****************** 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.com/
****************** 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.com/