two quick questions

  1. is it possible in a printer driver (unidrv based), to have the rendering
    plugin and the UI plugin implemented in one dll. If so, what are teh changes
    that need to be done in the inf so that it works?

  2. IS the registry the only recommended way to pass data between the UI
    plugin and the rendering plugin?

Albert

  1. Why would you want to? It is probably possible but I don’t see any
    advantage.

  2. The registry is NOT the recommended way for Rendering and UI to
    communicate. The DEVMODE is. That’s why so many of the APIs have one
    as a parameter (or embedded in a parameter).

ScottR

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A P
Sent: Monday, September 25, 2006 3:58 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] two quick questions

  1. is it possible in a printer driver (unidrv based), to have
    the rendering plugin and the UI plugin implemented in one dll. If so,
    what are teh changes that need to be done in the inf so that it works?

  2. IS the registry the only recommended way to pass data between
    the UI plugin and the rendering plugin?

Albert
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

>1) Why would you want to? It is probably possible but I don’t see any
advantage.

Point two wold clarify.

  1. The registry is NOT the recommended way for Rendering and UI to
    communicate. The DEVMODE is. That’s why so many of the APIs >have one as a
    parameter (or embedded in a parameter).

I was referring to sending custom data, not standard ones. Say, I want to
send my own structure down to the rendering plugin…how do I do that?

Using a shared memory is not what I like very mech, hence point one is
explained!

what are bands in printing?

Did you read the help for the DEVMODE structure? In particular, the
help for the field dmDriverExtra?

The DDK also contains samples which illustrate the use of the DEVMODE /
dmDriverExtra to communicate private/custom data.

ScottR

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A P
Sent: Tuesday, September 26, 2006 2:33 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] two quick questions

  1. Why would you want to? It is probably possible but I don’t
    see any advantage.

Point two wold clarify.

  1. The registry is NOT the recommended way for Rendering and UI
    to communicate. The DEVMODE is. That’s why so many of the APIs >have
    one as a parameter (or embedded in a parameter).

I was referring to sending custom data, not standard ones. Say,
I want to send my own structure down to the rendering plugin…how do I
do that?

Using a shared memory is not what I like very mech, hence point
one is explained!

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

DEVMODE includes a private portion, and the driver and UI are free to make it whatever they want (subject to it always having to have a fixed size). The private portion is where you put your “custom” data.

IF you attempt to do it any other way you will eventually be very sorry you did. It is possible for the rendering plugin to be invoked without the UI plugin getting into the act at all (while it is unusual, it is one of many “gotchas” in printing). Well, at least that used to be the case…

scott, bob,

thank you for the replies. may be i am unable to explain the problem
correctly.

i have read the DDK docs abt DEVMODE, but I am unable to corelate as to how
the structure is passed/filled in the OEMUI sample, when I press the
CALIBRATE button.

That is a custom created Property page, and thus the DEVMODE is not passed
there! How do I pass it the DEVMODE there?

can some1 pls help with this problem?

On 9/26/06, A P wrote:
>
> scott, bob,
>
> thank you for the replies. may be i am unable to explain the problem
> correctly.
>
> i have read the DDK docs abt DEVMODE, but I am unable to corelate as to
> how the structure is passed/filled in the OEMUI sample, when I press the
> CALIBRATE button.
>
> That is a custom created Property page, and thus the DEVMODE is not
> passed there! How do I pass it the DEVMODE there?
>

This is from the DDK documentation for the UI plugin technology:

“When IPrintOemUI::DocumentPropertySheets is called, the lParamInit member of the PROPSHEETUI_INFO structure contains the address of an OEMUIPSPARAM structure.”

OEMUIPSPARAM DDK documentation contains (among other things):

"pPublicDM
For calls to IPrintOemUI::DocumentPropertySheets:
Caller-supplied pointer to the printer’s public DEVMODEW structure.
For calls to IPrintOemUI::DevicePropertySheets:
Not used.
pOEMDM
For calls to IPrintOemUI::DocumentPropertySheets:
Caller-supplied pointer to the user interface plug-in’s private DEVMODEW members.
For calls to IPrintOemUI::DevicePropertySheets:
Not used. "

I only had to look for it. In general, I think you’ll receive similar counsel anywhere you go with a problem like this- you need to understand the technology before you try to play with the samples.