Greetings!

I have written once a communication device driver for Windows 95, then
Windows 2000 many years ago... then life took me to higher level
programming and I completely forgot about writing device drivers.

Now, life takes me back to what seems to be a need to implement a
device driver - this time for Windows XP and Vista.

So, my first question (before starting to look for the right source of
literature, development kits etc.) is: is the driver model for XP/
Vista still WDM (as introduced in Windows 98/2000)?

Now... I am not really sure I must implement the virtual audio device
that is needed for the system as device driver. My goal is to create
an audio device that is available to other applications in the system
(just like the default ones) - an audio device that is not really tied
to hardware but takes its input from an incoming data stream and
outputs it to a buffer that is read by another application.

Thus, I am wondering: can this be accomplished only by writing a
device driver? Or can this be done using user-mode Win32 API?

If indeed I arrived to the right group (meaning this is a classic
device driver task) could you please give me a hint or a tip what to
look for when searching for a tutorial or even a sample for creating
such a (virtual?) audio device?

Thanks in advance,
Don

Re: Sort-of-Newbie Question(s) by BobF

BobF
Wed Mar 14 08:44:22 CDT 2007


Check out the msvad sample in the current driver kits

On 13 Mar 2007 20:39:54 -0700, 0dbell@gmail.com wrote:

> Greetings!
>
> I have written once a communication device driver for Windows 95, then
> Windows 2000 many years ago... then life took me to higher level
> programming and I completely forgot about writing device drivers.
>
> Now, life takes me back to what seems to be a need to implement a
> device driver - this time for Windows XP and Vista.
>
> So, my first question (before starting to look for the right source of
> literature, development kits etc.) is: is the driver model for XP/
> Vista still WDM (as introduced in Windows 98/2000)?
>
> Now... I am not really sure I must implement the virtual audio device
> that is needed for the system as device driver. My goal is to create
> an audio device that is available to other applications in the system
> (just like the default ones) - an audio device that is not really tied
> to hardware but takes its input from an incoming data stream and
> outputs it to a buffer that is read by another application.
>
> Thus, I am wondering: can this be accomplished only by writing a
> device driver? Or can this be done using user-mode Win32 API?
>
> If indeed I arrived to the right group (meaning this is a classic
> device driver task) could you please give me a hint or a tip what to
> look for when searching for a tutorial or even a sample for creating
> such a (virtual?) audio device?
>
> Thanks in advance,
> Don

Re: Sort-of-Newbie Question(s) by 0dbell

0dbell
Wed Mar 14 10:15:22 CDT 2007

Bob, thank you for your tip.

I infer from your answer that yes - what I briefly described as the
task at hand belong to the device driver development realm, not win32
API (user mode) programming. Am I correct?

I also managed to find out that there is a actually a new device
driver model introduced with Vista (WDF), but if I want my device
driver to be backward compatible with Windows XP and Windows 2000, I
will need to go with WDM (which is still supported by Vista). Am I
correct?

I also found the latest WDK from microsoft available for download

http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx

But I am not sure whether:

1. Will it force me to use WDF instead of WDM? Does it support WDM,
despite it being the latest & greatest?

2. Can I use Visual C++ Express Edition to develop a device driver
using this WDK? Or must I purchase a more expensive version of Visual C
++?


Thanks,
Don

On Mar 14, 8:44 am, BobF <rNfOrSePeA...@charter.net> wrote:
> Check out the msvad sample in the current driver kits
>
> On 13 Mar 2007 20:39:54 -0700, 0db...@gmail.com wrote:
>
>
>
> > Greetings!
>
> > I have written once a communication device driver for Windows 95, then
> > Windows 2000 many years ago... then life took me to higher level
> > programming and I completely forgot about writing device drivers.
>
> > Now, life takes me back to what seems to be a need to implement a
> > device driver - this time for Windows XP and Vista.
>
> > So, my first question (before starting to look for the right source of
> > literature, development kits etc.) is: is the driver model for XP/
> > Vista still WDM (as introduced in Windows 98/2000)?
>
> > Now... I am not really sure I must implement the virtual audio device
> > that is needed for the system as device driver. My goal is to create
> > an audio device that is available to other applications in the system
> > (just like the default ones) - an audio device that is not really tied
> > to hardware but takes its input from an incoming data stream and
> > outputs it to a buffer that is read by another application.
>
> > Thus, I am wondering: can this be accomplished only by writing a
> > device driver? Or can this be done using user-mode Win32 API?
>
> > If indeed I arrived to the right group (meaning this is a classic
> > device driver task) could you please give me a hint or a tip what to
> > look for when searching for a tutorial or even a sample for creating
> > such a (virtual?) audio device?
>
> > Thanks in advance,
> > Don- Hide quoted text -
>
> - Show quoted text -



Re: Sort-of-Newbie Question(s) by Gianluca

Gianluca
Wed Mar 14 10:52:57 CDT 2007


<0dbell@gmail.com> wrote in message
news:1173885322.259621.129790@l75g2000hse.googlegroups.com...
> Bob, thank you for your tip.
>
> I infer from your answer that yes - what I briefly described as the
> task at hand belong to the device driver development realm, not win32
> API (user mode) programming. Am I correct?
>
> I also managed to find out that there is a actually a new device
> driver model introduced with Vista (WDF), but if I want my device
> driver to be backward compatible with Windows XP and Windows 2000, I
> will need to go with WDM (which is still supported by Vista). Am I
> correct?
>

WDF works from Windows 2000 on. I'm not an audio driver expert, but I think
you can definitely use WDF to develop your driver. That's actually the
suggested way to develop new drivers.

Actually KMDF is probably the right term instead of WDF. If I remember well
WDF was the original name of the framework. It changed to KMDF but the APIs
are still called Kdf<something>.


> I also found the latest WDK from microsoft available for download
>
> http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx
>
> But I am not sure whether:
>
> 1. Will it force me to use WDF instead of WDM? Does it support WDM,
> despite it being the latest & greatest?

The newest WDK allows you to compile both KMDF(WDF) drivers and WDM drivers.

>
> 2. Can I use Visual C++ Express Edition to develop a device driver
> using this WDK? Or must I purchase a more expensive version of Visual C
> ++?

You don't actually need any compiler/IDE. The WDK includes all that it's
needed to compile your driver. You can use VC Express as your editor, but
the compilation is done within the WDF environment with its own compiler.

Have a nice day
GV

>
>
> Thanks,
> Don
>
> On Mar 14, 8:44 am, BobF <rNfOrSePeA...@charter.net> wrote:
>> Check out the msvad sample in the current driver kits
>>
>> On 13 Mar 2007 20:39:54 -0700, 0db...@gmail.com wrote:
>>
>>
>>
>> > Greetings!
>>
>> > I have written once a communication device driver for Windows 95, then
>> > Windows 2000 many years ago... then life took me to higher level
>> > programming and I completely forgot about writing device drivers.
>>
>> > Now, life takes me back to what seems to be a need to implement a
>> > device driver - this time for Windows XP and Vista.
>>
>> > So, my first question (before starting to look for the right source of
>> > literature, development kits etc.) is: is the driver model for XP/
>> > Vista still WDM (as introduced in Windows 98/2000)?
>>
>> > Now... I am not really sure I must implement the virtual audio device
>> > that is needed for the system as device driver. My goal is to create
>> > an audio device that is available to other applications in the system
>> > (just like the default ones) - an audio device that is not really tied
>> > to hardware but takes its input from an incoming data stream and
>> > outputs it to a buffer that is read by another application.
>>
>> > Thus, I am wondering: can this be accomplished only by writing a
>> > device driver? Or can this be done using user-mode Win32 API?
>>
>> > If indeed I arrived to the right group (meaning this is a classic
>> > device driver task) could you please give me a hint or a tip what to
>> > look for when searching for a tutorial or even a sample for creating
>> > such a (virtual?) audio device?
>>
>> > Thanks in advance,
>> > Don- Hide quoted text -
>>
>> - Show quoted text -
>
>



RE: Sort-of-Newbie Question(s) by MartinHeller

MartinHeller
Wed Mar 14 13:54:16 CDT 2007

There are plug-in models for what you describe, for example VSTi, DXi, MAS,
RTAS, and AU. See, for example,
http://www.cakewalk.com/Products/DXi/default.asp. I'm not sure you really
want to write a device driver.

-- martin


"0dbell@gmail.com" wrote:

> Greetings!
...
> Now... I am not really sure I must implement the virtual audio device
> that is needed for the system as device driver. My goal is to create
> an audio device that is available to other applications in the system
> (just like the default ones) - an audio device that is not really tied
> to hardware but takes its input from an incoming data stream and
> outputs it to a buffer that is read by another application.
...

Re: Sort-of-Newbie Question(s) by BobF

BobF
Wed Mar 14 14:07:47 CDT 2007


Actually, those plug-in models won't provide a virtual device. The app
would have to support the plug-in model you choose. BTW, the cakewalk SDK
hasn't been actively maintained for some time.

To have the device show up as available to arbitrary audio apps, a driver
is required.



On Wed, 14 Mar 2007 11:54:16 -0700, Martin Heller wrote:

> There are plug-in models for what you describe, for example VSTi, DXi, MAS,
> RTAS, and AU. See, for example,
> http://www.cakewalk.com/Products/DXi/default.asp. I'm not sure you really
> want to write a device driver.
>
> -- martin
>
>
> "0dbell@gmail.com" wrote:
>
>> Greetings!
> ...
>> Now... I am not really sure I must implement the virtual audio device
>> that is needed for the system as device driver. My goal is to create
>> an audio device that is available to other applications in the system
>> (just like the default ones) - an audio device that is not really tied
>> to hardware but takes its input from an incoming data stream and
>> outputs it to a buffer that is read by another application.
> ...

Re: Sort-of-Newbie Question(s) by Doron

Doron
Wed Mar 14 23:17:39 CDT 2007

1) you can choose whatever model you want, WDM or KMDF. We don't force
anything on you for nearly all drivers

2) You can use VC++ EE for editting code, but you must use the WDK build
environment to build the code. THere are tools out there like ddkbuild.bat
(from http://www.hollistech.com) that will let you create a ddkbuild
environment that is executed from VC

WDF (windows driver foundation) is the umbrella term for both frameworks
(UMDF, KMDF) and verification tools (static driver verifier, prefast for
drivers).

If you are writing an audio driver, most likely you are going to be using
ks.sys or avstream.sys as your port model. KMDF does not apply to these
types of drivers since the port driver takes care of most of the work that
KMDF does

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


<0dbell@gmail.com> wrote in message
news:1173885322.259621.129790@l75g2000hse.googlegroups.com...
> Bob, thank you for your tip.
>
> I infer from your answer that yes - what I briefly described as the
> task at hand belong to the device driver development realm, not win32
> API (user mode) programming. Am I correct?
>
> I also managed to find out that there is a actually a new device
> driver model introduced with Vista (WDF), but if I want my device
> driver to be backward compatible with Windows XP and Windows 2000, I
> will need to go with WDM (which is still supported by Vista). Am I
> correct?
>
> I also found the latest WDK from microsoft available for download
>
> http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx
>
> But I am not sure whether:
>
> 1. Will it force me to use WDF instead of WDM? Does it support WDM,
> despite it being the latest & greatest?
>
> 2. Can I use Visual C++ Express Edition to develop a device driver
> using this WDK? Or must I purchase a more expensive version of Visual C
> ++?
>
>
> Thanks,
> Don
>
> On Mar 14, 8:44 am, BobF <rNfOrSePeA...@charter.net> wrote:
>> Check out the msvad sample in the current driver kits
>>
>> On 13 Mar 2007 20:39:54 -0700, 0db...@gmail.com wrote:
>>
>>
>>
>> > Greetings!
>>
>> > I have written once a communication device driver for Windows 95, then
>> > Windows 2000 many years ago... then life took me to higher level
>> > programming and I completely forgot about writing device drivers.
>>
>> > Now, life takes me back to what seems to be a need to implement a
>> > device driver - this time for Windows XP and Vista.
>>
>> > So, my first question (before starting to look for the right source of
>> > literature, development kits etc.) is: is the driver model for XP/
>> > Vista still WDM (as introduced in Windows 98/2000)?
>>
>> > Now... I am not really sure I must implement the virtual audio device
>> > that is needed for the system as device driver. My goal is to create
>> > an audio device that is available to other applications in the system
>> > (just like the default ones) - an audio device that is not really tied
>> > to hardware but takes its input from an incoming data stream and
>> > outputs it to a buffer that is read by another application.
>>
>> > Thus, I am wondering: can this be accomplished only by writing a
>> > device driver? Or can this be done using user-mode Win32 API?
>>
>> > If indeed I arrived to the right group (meaning this is a classic
>> > device driver task) could you please give me a hint or a tip what to
>> > look for when searching for a tutorial or even a sample for creating
>> > such a (virtual?) audio device?
>>
>> > Thanks in advance,
>> > Don- Hide quoted text -
>>
>> - Show quoted text -
>
>



Re: Sort-of-Newbie Question(s) by 0dbell

0dbell
Thu Mar 15 10:29:43 CDT 2007

On Mar 14, 11:17 pm, "Doron Holan [MS]" <dor...@nospam.microsoft.com>
wrote:
> 1) you can choose whatever model you want, WDM or KMDF. We don't force
> anything on you for nearly all drivers
>
> 2) You can use VC++ EE for editting code, but you must use the WDK build
> environment to build the code. THere are tools out there like ddkbuild.bat
> (fromhttp://www.hollistech.com) that will let you create a ddkbuild
> environment that is executed from VC
>
> WDF (windows driver foundation) is the umbrella term for both frameworks
> (UMDF, KMDF) and verification tools (static driver verifier, prefast for
> drivers).
>
> If you are writing an audio driver, most likely you are going to be using
> ks.sys or avstream.sys as your port model. KMDF does not apply to these
> types of drivers since the port driver takes care of most of the work that
> KMDF does
>

Thank you, Doron - and all other who responded. You gave me enough
information to start studying the subject in a time efficient manner.
After delving into this (and definitely run into problems) you may
hear from me again - probably with more intelligent questions. :-)

One tiny point to clarify: when you say "KMDF does not apply to these
types of drivers (ks.sys or avstream.sys as port model) since the port
driver takes care of most of the work that KMDF does" - Do you mean
that with ks.sys/avstream.sys I should be using UMDF or that I should
stick to WDM?

Also, I noticed that Gianluca said that if I decide to use WDF
(instead of the older WDM with which I am more familiar) to develop an
audio driver, it will be compatible with Windows 2000 and XP as well.
Can you confirm that?

Thanks,
Don


Re: Sort-of-Newbie Question(s) by Maxim

Maxim
Mon Mar 26 07:45:54 CDT 2007

> So, my first question (before starting to look for the right source of
> literature, development kits etc.) is: is the driver model for XP/
> Vista still WDM (as introduced in Windows 98/2000)?

Yes. XP has nearly no differences from Windows in this.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com