Sample Code

windows driver samples/ Print Driver INF Sample/ C++/ MultiOS/ MultiOs.inf/

; This inf file provides the general structure for using a single
; INF file to install different versions of printer drivers on
; different versions of Windows. In this case the INF will install a
; slightly different version of the printer driver on Windows Vista
; and above than on Windows Server 2003 and below.
;
; It includes specific INF constructs to demonstrate:
;    Platform extensions, including consistent usage
;    Installation on multiple platforms from one INF file
;    
; Note: In order to support installation of different language
; versions, any OEM provided DLLs should include resources for
; each of these languages
;
; Copyright 2005 Microsoft Corporation

[Version]
Signature="$Windows NT$"
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer
Provider="OEM Company"
CatalogFile=MultiOS.cat		; Single Catalog file for all OS versions
DriverVer=10/10/2005, 1.2.3.4


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Manufacturer and Models Sections 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;Use decorations and platform extensions to differentiate between different platforms
[Manufacturer]
"OEM Company" = Company, NTx86, NTamd64, NTia64, NTx86.6.0, NTamd64.6.0, NTia64.6.0

; Models sections for installation of x86 driver on downlevel (pre-Vista) machines
[Company.NTx86]
"My Device Description" = DriverInstall, OEM_Company_NameABC_640A, ABC_Printer

; Models sections for installation of x64 driver on downlevel (pre-Vista) machines
[Company.NTamd64]
"My Device Description" = DriverInstall, OEM_Company_NameABC_640A, ABC_Printer

; Models sections for installation of ia64 driver on downlevel (pre-Vista) machines
[Company.NTia64]
"My Device Description" = DriverInstall, OEM_Company_NameABC_640A, ABC_Printer


;Models section for installation of x86 driver on Windows Vista and above
[Company.NTx86.6.0]
"My Device Description"                  = DriverInstall_Vista, OEM_Company_NameABC_640A, ABC_UniDrv5_Printer

;Models section for installation of x64 driver on Windows Vista and above
[Company.NTamd64.6.0]
"My Device Description"                  = DriverInstall_Vista, OEM_Company_NameABC_640A, ABC_UniDrv5_Printer

;Models section for installation of ia64 driver on Windows Vista and above
[Company.NTia64.6.0]
"My Device Description"                  = DriverInstall_Vista, OEM_Company_NameABC_640A, ABC_UniDrv5_Printer

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;DDInstall Section for Windows 2000, Windows XP and Windows Server 2003
;
;Note, in case the Driver Package redistributes the UniDrv core drivers
;for downlevel OSes, changes must be done to both the downlevel DDInstall
;section as well as the SourceDisksFiles section.
;
;[DriverInstall_ReDist]
;[email protected],@OEMABC.GPD,@TTFSUB.GPD,@UNIDRV.DLL,@UNIRES.DLL,@UNIDRVUI.DLL,@STDNAMES.GPD,@UNIDRV.HLP
;DataFile=OEMABC.GPD
;DriverFile=UNIDRV.DLL
;ConfigFile=UNIDRVUI.DLL
;HelpFile=UNIDRV.HLP
;
;[SourceDisksFiles]
; ...
;TTFSUB.GPD    = 1
;UNIDRV.DLL    = 1
;UNIRES.DLL    = 1
;UNIDRVUI.DLL  = 1
;STDNAMES.GPD  = 1
;UNIDRV.HLP    = 1
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[DriverInstall]
[email protected],@OEMABC.GPD
DataFile=OEMABC.GPD
DataSection=UNIDRV_DATA
Include=NTPRINT.INF
Needs=UNIDRV.OEM,TTFSUB.OEM

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;DDInstall Sections for Windows Vista and above
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[DriverInstall_Vista]
[email protected],@OEMABC.GPD
DataFile=OEMABC.GPD
CoreDriverSections="{D20EA372-DD35-4950-9ED8-A6335AFE79F0},UNIDRV.OEM,UNIDRV_DATA,TTFSUB.OEM"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;These sections are to identify the Vista drivers as "Package Aware" to allow them to
;take advantage of features such as "Package Point-and-Print" in Vista and above
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[PrinterPackageInstallation.x86]
PackageAware=TRUE
CoreDriverDependencies={D20EA372-DD35-4950-9ED8-A6335AFE79F0}

[PrinterPackageInstallation.ia64]
PackageAware=TRUE
CoreDriverDependencies={D20EA372-DD35-4950-9ED8-A6335AFE79F0}

[PrinterPackageInstallation.amd64]
PackageAware=TRUE
CoreDriverDependencies={D20EA372-DD35-4950-9ED8-A6335AFE79F0}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Source Media Information Sections
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[DestinationDirs]
DefaultDestDir=66000    

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Specify different paths for different processor architectures.
;Note that these paths are relative to the root of the physical media,
; e.g. the location where the INF is located.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[SourceDisksNames.x86]
1   = %MediaDescription%,,,"I386"

[SourceDisksNames.amd64]
1   = %MediaDescription%,,,"Amd64"

[SourceDisksNames.ia64]
1   = %MediaDescription%,,,"IA64"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Since we do not specify a path in SourceDisksFiles the path used will be relative
;to the source media as specified in the [SourceDisksNames] sections.
;Since the SourceDisksNames use a different root for each processor architecture
; we do not need to make that differentiation here.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[SourceDisksFiles]
OEMRES.DLL  = 1
OEMABC.GPD  = 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Strings Sections
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Base strings section for use on US English language systems
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Strings]
MediaDescription = "Description for Vendor provided media"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;French strings section to be used on French language systems
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Strings.040c]
;Substitute French translations for English language text below, as appropriate.
MediaDescription = "Description for Vendor provided media"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;German strings section to be used on German language systems
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Strings.0407]
;Substitute German translations for English language text below, as appropriate.
MediaDescription = "Description for Vendor provided media"

Our Services

  • What our customers say about us?

© 2011-2025 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS