WDM And Printer drivers

Does the WDM architecture not apply to printer drivers???

regards

It does not.

-----Original Message-----
From: Ramakrishnan Jayaraman [SMTP:xxxxx@yahoo.com]
Sent: Monday, October 23, 2000 2:29 AM
To: NT Developers Interest List
Subject: [ntdev] WDM And Printer drivers

Does the WDM architecture not apply to printer drivers???

regards


You are currently subscribed to ntdev as: xxxxx@eltron.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

No. Printer drivers do not follow the WDM architecture.

Regards,
Santhosh

Hello Santhosh,

Monday, October 23, 2000, 6:08:47 PM, you wrote:

SMB> No. Printer drivers do not follow the WDM architecture.

What about video drivers?

Best regards,
Sergey

see below

Sergey Kipnis wrote:
>Hello Santhosh,
>
>Monday, October 23, 2000, 6:08:47 PM, you wrote:
>
>
>SMB> No. Printer drivers do not follow the WDM architecture.
>
>What about video drivers?

No, even the video drivers do not follow the WDM architecture.

Bot the Printer driver and the video drivers were called legacy drivers and
they have their own architecture.
They reply on the heavily on the GDI.

Also if you go through the various entry points in either the printer
driver or the video driver, the entry points in the printer driver and the
video drivers are almost the same.

Also note that if a driver follows the WDM architectre, the main advantage
is that it should work in both Win 9x and Win 2000 (earlier NT 5) but if
you see the printer driver architecture, they are different for both Win 9x
and Win 2000(mean to say that when you develop a printer driver on Win 9x,
the same cannot be loaded on Win 2000)

>Best regards,
> Sergey
>
>
>
>—
>You are currently subscribed to ntdev as: xxxxx@wipro.com
>To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
>

So does that mean that printer drivers do not support plug & play in any
manner???

----- Original Message -----
From: Santhosh Mysore Brahmappa
To: NT Developers Interest List
Sent: Tuesday, October 24, 2000 11:21 PM
Subject: [ntdev] Re: WDM And Printer drivers

> see below
>
> Sergey Kipnis wrote:
> >Hello Santhosh,
> >
> >Monday, October 23, 2000, 6:08:47 PM, you wrote:
> >
> >
> >SMB> No. Printer drivers do not follow the WDM architecture.
> >
> >What about video drivers?
>
> No, even the video drivers do not follow the WDM architecture.
>
> Bot the Printer driver and the video drivers were called legacy drivers
and
> they have their own architecture.
> They reply on the heavily on the GDI.
>
> Also if you go through the various entry points in either the printer
> driver or the video driver, the entry points in the printer driver and the
> video drivers are almost the same.
>
> Also note that if a driver follows the WDM architectre, the main advantage
> is that it should work in both Win 9x and Win 2000 (earlier NT 5) but if
> you see the printer driver architecture, they are different for both Win
9x
> and Win 2000(mean to say that when you develop a printer driver on Win 9x,
> the same cannot be loaded on Win 2000)
>
> >Best regards,
> > Sergey
> >
> >
> >
> >—
> >You are currently subscribed to ntdev as: xxxxx@wipro.com
> >To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>

The terminology is kind of confusing. Let me try to explain…

The key point of the WDM model is common APIs/DDIs (device driver
interfaces) between Windows 2000 and the Windows 98/Me operating system
to allow binary compatibility of certain classes of device drivers.
This concept is somewhat orthogonal to Plug and Play.

Drivers can support Plug and Play without being WDM drivers (e.g. the
same driver binary doesn’t work on both 98/ME and Windows 2000). So
yes, printer drivers can (and should) do Plug and Play.

But things get a little more complicated with printers, because printers
kind of have their own way of doing plug and play, mainly because the
parallel port bus wasn’t really designed for reliable device detection
and notification.

And when you add in USB printers, things get even more clouded. Because
USB support is part of the WDM model, in some sense you might consider
USB printer drivers as being partially WDM drivers. But if you are
trying to write a printer driver for a USB printer please strongly
consider using usbprint.sys as described at
http://www.microsoft.com/hwdev/print/usbprint.htm.

If you want a brief history of how WDM came into being and what it is
today, watch the WinHEC WDM talk
(http://www.microsoft.com/winhec/sessions/driverpresents.htm). This can
be viewed right from your desktop (assuming that you have a 128K+
connection to the internet).

Hopefully, I haven’t caused even more confusion :)!


Sandy Spinrad
Device Driver Evangelist
Microsoft Corporation
-----Original Message-----
From: Ramakrishnan Jayaraman [mailto:xxxxx@yahoo.com]
Sent: Tuesday, October 24, 2000 8:50 PM
To: NT Developers Interest List
Subject: [ntdev] Re: WDM And Printer drivers

So does that mean that printer drivers do not support plug & play in any
manner???

----- Original Message -----
From: Santhosh Mysore Brahmappa
To: NT Developers Interest List
Sent: Tuesday, October 24, 2000 11:21 PM
Subject: [ntdev] Re: WDM And Printer drivers

> see below
>
> Sergey Kipnis wrote:
> >Hello Santhosh,
> >
> >Monday, October 23, 2000, 6:08:47 PM, you wrote:
> >
> >
> >SMB> No. Printer drivers do not follow the WDM architecture.
> >
> >What about video drivers?
>
> No, even the video drivers do not follow the WDM architecture.
>
> Bot the Printer driver and the video drivers were called legacy
drivers
and
> they have their own architecture.
> They reply on the heavily on the GDI.
>
> Also if you go through the various entry points in either the printer
> driver or the video driver, the entry points in the printer driver and
the
> video drivers are almost the same.
>
> Also note that if a driver follows the WDM architectre, the main
advantage
> is that it should work in both Win 9x and Win 2000 (earlier NT 5) but
if
> you see the printer driver architecture, they are different for both
Win
9x
> and Win 2000(mean to say that when you develop a printer driver on Win
9x,
> the same cannot be loaded on Win 2000)
>
> >Best regards,
> > Sergey
> >
> >
> >
> >—
> >You are currently subscribed to ntdev as:
xxxxx@wipro.com
> >To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>


You are currently subscribed to ntdev as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

No, video drivers are different between 9x and Windows 2000. At least
respect to the video mini port and the display driver (the code that
interfaces to GDI). OpenGL(MCD) and DirectX portions of display drivers
may have some commonality across 9X and Windows 2000, but I don’t know
the specifics.

Let me know if you want more details, and I’ll dig them up.

–Sandy

-----Original Message-----
From: Sergey Kipnis [mailto:xxxxx@twins.com.pl]
Sent: Tuesday, October 24, 2000 2:44 AM
To: NT Developers Interest List
Subject: [ntdev] Re: WDM And Printer drivers

Hello Santhosh,

Monday, October 23, 2000, 6:08:47 PM, you wrote:

SMB> No. Printer drivers do not follow the WDM architecture.

What about video drivers?

Best regards,
Sergey


You are currently subscribed to ntdev as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Hello Sandy,

Wednesday, October 25, 2000, 9:32:13 AM, you wrote:

SS> No, video drivers are different between 9x and Windows 2000. At least
SS> respect to the video mini port and the display driver (the code that
SS> interfaces to GDI). OpenGL(MCD) and DirectX portions of display drivers
SS> may have some commonality across 9X and Windows 2000, but I don’t know
SS> the specifics.

SS> Let me know if you want more details, and I’ll dig them up.

I’m interested in the details of video devices organization. For
example video miniport drivers isn’t WDM, its don’t have dispatch
functions, etc. Videoprt.sys does build for the miniport driver device
objects. I can’t understand how this architecture fit into WDM. Where
are video WDMs?

The only way I found to manage video devices is
creation upper video filter for display class. But I(as newbie in
NT kernel programming) don’t understand how to link names, like
“Video0” or “\Device\ati” and corresponding device objects.

Next, beside miniport driver we have display driver working togeteher
with win32k.sys. How could I control this display driver using documented
NT features? In short I need to intercept most calls going into the
display driver and possibly few going into win32k.sys. For me it is
not clear to say least.

SS> --Sandy

SS> -----Original Message-----
SS> From: Sergey Kipnis [mailto:xxxxx@twins.com.pl]
SS> Sent: Tuesday, October 24, 2000 2:44 AM
SS> To: NT Developers Interest List
SS> Subject: [ntdev] Re: WDM And Printer drivers

SS> Hello Santhosh,

SS> Monday, October 23, 2000, 6:08:47 PM, you wrote:

SMB>> No. Printer drivers do not follow the WDM architecture.

SS> What about video drivers?

SS> Best regards,
SS> Sergey

SS> —
SS> You are currently subscribed to ntdev as: xxxxx@exchange.microsoft.com
SS> To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Best regards,
Sergey

Sergey Kipnis:
SS> No, video drivers are different between 9x and Windows 2000. At least
SS> respect to the video mini port and the display driver (the code that
SS> interfaces to GDI). OpenGL(MCD) and DirectX portions of display
SS> drivers may have some commonality across 9X and Windows 2000, but I
SS> don’t know the specifics.

I’m interested in the details of video devices organization. For example
video miniport drivers isn’t WDM, its don’t have dispatch functions,
etc. Videoprt.sys does build for the miniport driver device objects. I
can’t understand how this architecture fit into WDM. Where are video
WDMs?

Okay - sorry if this is unnecessary repetition of well-known information.
All can be obtained from the DDK documentatoin. Apologies also if I miss
the point of your query.

As an earlier post points out, on Win2000 the video miniport and the
display driver are not WDM and there are significant differences between
the Win 9x and NT video driver architectures. I don’t really know the
precise behind-the-scenes workings of the device object creation and
management. If that is what you want the following may have little
relevance…

On Win2000 the video miniport is a legacy driver. That is not to say,
however, that it is not a plug and play driver. There is interaction with
the plug and play manager, mostly during driver initialization and mostly
mediated by the video port driver on behalf of the video miniport. The
video port driver also creates the FDO on behalf of the miniport driver and
calls the miniport for the purposes of power management and for the
purposes of enumerating child devices (such as the monitor) when it
receives the corresponding PnP IRPs.

The PnP matches up the actual display adapters on the system to miniport
drivers. During initialization the PnP manager starts the device by
sending an IRP to the video port driver which, in turn, calls the
miniport’s HwVidFindAdapter routine (previously returned in response to a
call to the miniport’s DriverEntry function) so that the driver can claim
it’s own devices and their resources. Calls to VideoPortGetAccessRanges
from the FindAdapter routine return resources assigned by the PnP manager.

By the way, the miniport’s main IOCTL dispatch routine is its HwVidStartIO
function, also returned as a function pointer in response to the video
port’s initial call to the DriverEntry function.

The other video-related driver, the device display interface (DDI) driver,
is not a ‘normal’ driver at all and certainly not a WDM driver - it has the
.dll file extension although it operates in kernel mode. Its entry points
are strictly via those exported to GDI (win32k.sys) and those exported for
DirectDraw. (GDI calls DrvEnableDriver which returns to GDI a function
pointer table of the supported DDI calls. The DirectDraw function pointers
are obtained in a similar way.) GDI sets up an exclusive association
between the display driver and its miniport driver. In other words, as far
as I know, it is impossible for another driver to open the video miniport
driver and to send it IOCTLs. The display driver communicates with it’s
miniport driver by calling GDI’s EngDeviceIoControl function which in turn
uses the IO manager to call its associated miniport driver - the video port
portion calls the StartIO function mentioned above.

The only way I found to manage video devices is creation upper video
filter for display class. But I(as newbie in NT kernel programming) don’t
understand how to link names, like “Video0” or “\Device\ati” and
corresponding device objects.

Not sure what you’re doing or what you’re trying to achieve here. Any
aspect of NT drivers relating to PnP or device objects are taken care of by
the video port driver - the VideoPort API hides the precise workings. The
DDI driver is rather unique to video drivers (and printer drivers).

Next, beside miniport driver we have display driver working togeteher
with win32k.sys. How could I control this display driver using documented
NT features? In short I need to intercept most calls going into the
display driver and possibly few going into win32k.sys. For me it is not
clear to say least.

It would not be easy to intercept calls to any display driver unless you
could obtain GDI’s internal function pointer table set up for that display
driver. This would not be a documented procedure.

Gordon

Hello gmcewen,

Wednesday, October 25, 2000, 2:16:06 PM, you wrote:

gio> Sergey Kipnis:
SS>> No, video drivers are different between 9x and Windows 2000. At least
SS>> respect to the video mini port and the display driver (the code that
SS>> interfaces to GDI). OpenGL(MCD) and DirectX portions of display
SS>> drivers may have some commonality across 9X and Windows 2000, but I
SS>> don’t know the specifics.

>
> I’m interested in the details of video devices organization. For example
> video miniport drivers isn’t WDM, its don’t have dispatch functions,
> etc. Videoprt.sys does build for the miniport driver device objects. I
> can’t understand how this architecture fit into WDM. Where are video
> WDMs?

[skip]

Thanks, Gordon, for your explanation. I need to understand *big* picture, but
thhere are no *big* pictures in DDK. At least for me.

> The only way I found to manage video devices is creation upper video
> filter for display class. But I(as newbie in NT kernel programming) don’t
> understand how to link names, like “Video0” or “\Device\ati” and
> corresponding device objects.

gio> Not sure what you’re doing or what you’re trying to achieve here. Any
gio> aspect of NT drivers relating to PnP or device objects are taken care of by
gio> the video port driver - the VideoPort API hides the precise workings. The
gio> DDI driver is rather unique to video drivers (and printer drivers).

I need to know name of the device(“Video0”) by PDEVICE_OBJECT. And
vice versa.

I need to build list of all devices in the system on fly in
kernel-mode. In Win-9x VxD I used to call configmgr services. Easy task.
But in NT’s kernel-node drivers it is more complex, isn’t it? What
could I use to gather info in kernel-mode about driver installed in
the system, about its properties, etc ?

> Next, beside miniport driver we have display driver working togeteher
> with win32k.sys. How could I control this display driver using documented
> NT features? In short I need to intercept most calls going into the
> display driver and possibly few going into win32k.sys. For me it is not
> clear to say least.

gio> It would not be easy to intercept calls to any display driver unless you
gio> could obtain GDI’s internal function pointer table set up for that display
gio> driver. This would not be a documented procedure.

Really? It’s a pity.

Best regards,
Sergey

Sergey Kipnis:

I need to know name of the device(“Video0”) by PDEVICE_OBJECT. And
vice versa.

I need to build list of all devices in the system on fly in
kernel-mode. In Win-9x VxD I used to call configmgr services. Easy task.
But in NT’s kernel-node drivers it is more complex, isn’t it? What
could I use to gather info in kernel-mode about driver installed in
the system, about its properties, etc ?

In kernel mode and on-the-fly - I’m not the right person to tell you how to
do this. OSR’s ‘Device and Driver Explorer’ utility devicetree does
something like this doesn’t it? A very impressive tool.

Gordon

Hi all,
Does anyone know how to install a language monitor and Microsoft’s
usbmon.dll, usbprint.sys on Windows 98? I installed my printer driver with a
language monitor, but somehow the spooler bypass it, and calls usbmon.dll
directly. But if I select parallel port instead of USB port, it works. Any
comment is welcome.

Regards

-----Original Message-----
From: Chou, Ken [SMTP:xxxxx@eltron.com]
Sent: Monday, October 23, 2000 8:32 AM
To: NT Developers Interest List
Subject: [ntdev] RE: WDM And Printer drivers

It does not.

> -----Original Message-----
> From: Ramakrishnan Jayaraman [SMTP:xxxxx@yahoo.com]
> Sent: Monday, October 23, 2000 2:29 AM
> To: NT Developers Interest List
> Subject: [ntdev] WDM And Printer drivers
>
> Does the WDM architecture not apply to printer drivers???
>
> regards
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@eltron.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: xxxxx@eltron.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)