Thank you for the feedback and the warning regarding the use of new. Actually,
my implementation of new in the added file stdunk.cpp was copied from stdunk.h,
based on the use of ExAllocatePoolWithTag. I assume that method does the
correct thing. So this seems not an issue to me now.
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Tim Roberts
Sent: dinsdag 7 juni 2016 19:16
Subject: [wdmaudiodev] Re: Question on MSDN sysvad driver example in
combination with Ks Studio; failing pin instantiation.
Koll, Rob wrote:
I am quite new to driver development. As starting point I use the MSDN sysvad
First of all, I noted that when building with MSVC professional 2015 update 2
there are issues around the inline use of new and delete operators. I solved
that by copying stdunk.h into my project, removing the inline code and
providing a stdunk.cpp with the now missing implementations. Please let me know
if this is a known issue, and whether or not my approach is correct.
You can't use bare operator new and delete in the kernel, because you need to
be able to specify the paging requirement. There is an implementation of
operator new and delete in <kcom.h> that accepts a paging parameter:
MY_DATA * myData = new (NonPagedPoolNx) MY_DATA;
After building the sysvad example (on a Win7 machine) I can deploy it onto a
Win 10 target machine. I can see the new device and audio end points. I can
select the sysvad Wave Speaker as default device. Upon playing music with media
player a file is created and written into the C:\ directory. The volume
indicator in the Playback Devices box goes halfway, and falls back to zero upon
ending the playback.
Then you've done very well.
My assumption is that I should be able to instantiate the pin using Ks Studio
(where all devices and end points are visible). The pin creation fails, with a
message indicating that KsCreatePin fails. There are different codes, depending
on how I exactly instantiate the pin.
KsStudio is a handy tool for doing basic validation of a KS driver. Using it
to create functioning graphs is a guru-level exercise, one that I have managed
very rarely during my two decades with KS drivers. Frankly, if your driver is
working with the audio engine, you have already validated WAY more stuff than
you can possibly check with KsStudio.
Tim Roberts, timr@xxxxxxxxx<mailto:timr@xxxxxxxxx>
Providenza & Boekelheide, Inc.
The information contained in this message may be confidential and legally
protected under applicable law. The message is intended solely for the
addressee(s). If you are not the intended recipient, you are hereby notified
that any use, forwarding, dissemination, or reproduction of this message is
strictly prohibited and may be unlawful. If you are not the intended recipient,
please contact the sender by return e-mail and destroy all copies of the