Coinstallers and INF files

Hi list,

I’ve downloaded and installed Windows Logo Kit version 1.2 (mistakenly
believing it to be the WDK - I installed it anyway, just for kicks), WDK
version - is this right? - 6001.18001 and WDF redist. version 1.7.

I’ve written the beginnings of a UMDF driver DLL and I want to install
it and see what output it gives me, but I’m having an impossible time
writing an INF file with which to install the DLL. The infgate.bat
script on my Logo Kit Controller warns me:

W22.1.2083 Section [Generic.CoInstallers] not referenced
W22.1.2083 Section [Generic.CoInstallers_AddReg] not referenced
W22.1.2216 File WudfUpdate_01007.dll is not referred to by any model

(There are some other warnings, but I think I can fix them myself.)

Clearly something is missing, but what? I’ve pored over the MSDN
documentation but I’ve just gotten myself utterly confused. I hope
someone can help me straighten this one out.

Thanks,
Fatman

[The list rejected my file >:( I’ll post it here instead.]

; names changes to protect the guilty innocent

[Version]

Signature=“$Windows NT$”

Class=Printer

ClassGUID={4d36e979-e325-11ce-bfc1-08002be10318}

Provider=“Acme Corporation”

LayoutFile=ntprint.inf

DriverVer=10/20/2008 ; no version as it won’t accept major version < 1

[Manufacturer]

%acme%=Generic

[Generic]

%gen%=gen.gpd,

[Generic.CoInstallers]

AddReg=Generic.CoInstallers_AddReg

[Generic.CoInstallers_AddReg]

HKR,CoInstallers32,0x00010008,“WUDFUpdate_01007.dll, CoDeviceInstall”

[gen.gpd]

CopyFiles=@gen.gpd,@gen.ini,@Printer.dll

DataFile=gen.gpd

DataSection=UNIDRV_DATA

Include=NTPRINT.INF

Needs=UNIDRV_DATA

[SourceDisksNames]

1 = %disk%,“”

[SourceDisksFiles]

gen.gpd = 1

gen.ini = 1

Printer.dll = 1,

WudfUpdate_01007.dll=1

[DestinationDirs]

DefaultDestDir=66000

[Strings]

disk = “Network Install”

acme = “Acme Corporation”

gen = “Generic Printer”

UMDF does not currently support printer drivers. If you want to write a UMDF driver for some other type of driver, I would suggest starting off with the skeleton or echo sample driver’s INF

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@crackmonkey.us
Sent: Wednesday, October 22, 2008 6:59 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Coinstallers and INF files

Hi list,

I’ve downloaded and installed Windows Logo Kit version 1.2 (mistakenly
believing it to be the WDK - I installed it anyway, just for kicks), WDK
version - is this right? - 6001.18001 and WDF redist. version 1.7.

I’ve written the beginnings of a UMDF driver DLL and I want to install
it and see what output it gives me, but I’m having an impossible time
writing an INF file with which to install the DLL. The infgate.bat
script on my Logo Kit Controller warns me:

W22.1.2083 Section [Generic.CoInstallers] not referenced
W22.1.2083 Section [Generic.CoInstallers_AddReg] not referenced
W22.1.2216 File WudfUpdate_01007.dll is not referred to by any model

(There are some other warnings, but I think I can fix them myself.)

Clearly something is missing, but what? I’ve pored over the MSDN
documentation but I’ve just gotten myself utterly confused. I hope
someone can help me straighten this one out.

Thanks,
Fatman

[The list rejected my file >:( I’ll post it here instead.]

; names changes to protect the guilty innocent

[Version]

Signature=“$Windows NT$”

Class=Printer

ClassGUID={4d36e979-e325-11ce-bfc1-08002be10318}

Provider=“Acme Corporation”

LayoutFile=ntprint.inf

DriverVer=10/20/2008 ; no version as it won’t accept major version < 1

[Manufacturer]

%acme%=Generic

[Generic]

%gen%=gen.gpd,

[Generic.CoInstallers]

AddReg=Generic.CoInstallers_AddReg

[Generic.CoInstallers_AddReg]

HKR,CoInstallers32,0x00010008,“WUDFUpdate_01007.dll, CoDeviceInstall”

[gen.gpd]

CopyFiles=@gen.gpd,@gen.ini,@Printer.dll

DataFile=gen.gpd

DataSection=UNIDRV_DATA

Include=NTPRINT.INF

Needs=UNIDRV_DATA

[SourceDisksNames]

1 = %disk%,“”

[SourceDisksFiles]

gen.gpd = 1

gen.ini = 1

Printer.dll = 1,

WudfUpdate_01007.dll=1

[DestinationDirs]

DefaultDestDir=66000

[Strings]

disk = “Network Install”

acme = “Acme Corporation”

gen = “Generic Printer”


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

hi doran,

thanks for the valuable information , i just have a stupid question

when u tell umdf doesnt support printer driver in WDF , i would like to know what is the difference between handling printers in WDM and WDF ?

is that the framework for printer is not been defined ?

regards
sainath

xxxxx@live.in wrote:

thanks for the valuable information , i just have a stupid question

when u tell umdf doesnt support printer driver in WDF , i would like to know what is the difference between handling printers in WDM and WDF ?

Printer drivers are usually not WDM, either.

is that the framework for printer is not been defined ?

Printers, like graphics cards, use GDI drivers. That is a very
different kettle of fish, with its own set of rules that are quite
different from the normal NT driver model. I doubt they will ever be
supported in KMDF. When you try to bolt them together, none of the
holes line up, so to speak.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for the reply.

UMDF does not currently support printer drivers.

Ah. That makes things difficult.

some other type of driver

I’m pretty sure I need a printer driver. There must be some way to write
one, even if it doesn’t involve the UMDF.

Perhaps you can suggest a direction for me if I explain what I’m doing.
Basically, what I’m trying to do is insert an entry into the
“Printers” list which, when printed to, grabs the text and does
something to it. I’m not concerned with the “something” right now, I
just need the interface set up as an entry point. What would you
suggest? I’d prefer not to use the KMDF if I can possibly avoid it.

By the way, given that UMDF doesn’t work with printers, what are the
print driver samples in the WDK for? My INF file is based on
6001.18001\src\print\tty\tty.inf, among others.

xxxxx@crackmonkey.us wrote:

Basically, what I’m trying to do is insert an entry into the
“Printers” list which, when printed to, grabs the text and does
something to it. I’m not concerned with the “something” right now, I
just need the interface set up as an entry point. What would you
suggest? I’d prefer not to use the KMDF if I can possibly avoid it.

So this is already done for you.
“XPS Writer” printer comes with NET 3.5 framework;
it will capture the file, and the XPS format is documented.

Regards,
–PA

> “XPS Writer” printer comes with NET 3.5 framework

Thanks Pavel! I will definitely check that out. It seems like a quick way
to keep the Boss smiling. As I always say (in private), a happy boss is
a generous boss. :wink:

If anyone’s interested, I found a SourceForge project (“imageprinter”)
which does more or less what I was doing. Definitely worth a quick
source tarball download for any newbie printer driver author, I think.

I think that’s enough new reseach material to be going on with. Thanks
to all who replied.

X-No-Archive: yes

xxxxx@crackmonkey.us wrote:

> “XPS Writer” printer comes with NET 3.5 framework

Thanks Pavel! I will definitely check that out. It seems like a quick way
to keep the Boss smiling. As I always say (in private), a happy boss is
a generous boss. :wink:

If anyone’s interested, I found a SourceForge project (“imageprinter”)
which does more or less what I was doing. Definitely worth a quick
source tarball download for any newbie printer driver author, I think.

I think that’s enough new reseach material to be going on with. Thanks
to all who replied.

yep. xml makes bosses happy these days… but generous? forget it :frowning:

– PA

I was there when both of these models were first released (I had QA responsibility for printers and dabbled a bit on the KM side- out of interest, as I’d worked on device drivers on some mini and micro OS before)- more precisely when the NT driver model (which was a primary precursor of WDM) and the initial GDI driver model were released in NT 3.1.

They had NOTHING in common (except for the KM miniport for a display driver being a specialized NT driver) right from the start- they weren’t even designed by the same team [except in a very broad sense]. Both have been in the DDK (and later, the WDK) from the beginning because they are both “device driver models”, but assuming any framework will ever cover both is like saying “tricycles and 18-wheeled tractor trailers both have wheels and let you move from one place to another, so a single method of licensing operators will work for both”.

It looks like from later posts you got onto the right track eventually- just thought the point might need some emphasis.

IF you ever see a UMDF or KMDF printer driver, then (IMHO) somebody has done something incredibly foolish, along the lines of using a chainsaw as a screwdriver.

-----Original Message-----



xxxxx@live.in wrote:
> thanks for the valuable information , i just have a stupid question
>
> when u tell umdf doesnt support printer driver in WDF , i would like to know what is the difference between handling printers in WDM and WDF ?
>

Printer drivers are usually not WDM, either.

> is that the framework for printer is not been defined ?
>

Printers, like graphics cards, use GDI drivers. That is a very
different kettle of fish, with its own set of rules that are quite
different from the normal NT driver model. I doubt they will ever be
supported in KMDF. When you try to bolt them together, none of the
holes line up, so to speak.

--
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

xxxxx@crackmonkey.us wrote:

I’m pretty sure I need a printer driver. There must be some way to write
one, even if it doesn’t involve the UMDF.

By the way, given that UMDF doesn’t work with printers, what are the
print driver samples in the WDK for? My INF file is based on
6001.18001\src\print\tty\tty.inf, among others.

Those are print drivers, but they aren’t UMDF, nor are they KMDF.
tty\render is a user-mode GDI driver. That’s a very different
technology from UMDF.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.