Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have written a port monitor based on the "Virtual Image Printer" open-source project. It works fine on XP but fails to load the port monitor DLL on Win7, even though the NSIS-based install process has worked and the printer is installed.

I suspect the problem is either (a) in the INF or the registry and that somehow the printer, port and DLL are not connected together, or (b) something stops the DLL loading, but I don't know what.

Any help would be very much appreciated, this is driving me nuts!

Rik.
rikpage123@gmail.com


Registry entries after install

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print ->
 \Environments\Windows NT x86\Drivers\Version-3\MyPrinter
 \Monitors\MyPrinter_Port
 \Printers\MyPrinter

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion ->
 \Print\Printers\MyPrinter\DsDriver,DsSpooler,PnPData,PrinterDriverData
 \Ports - has value "MyPrinter_Port"


INF file:

[Version]
Signature="$Windows NT$"
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer
Provider="Ruk"
DriverVer=08/03/2010, 1.1.1.1

[Manufacturer]
"%Ruk%"=Ruk, NTx86, NTx86.6.0

[Ruk]
"MyPrinter" = DriverInstall
[Ruk.NTx86]
"MyPrinter" = DriverInstall
[Ruk.NTx86.6.0]
"MyPrinter" = DriverInstall

; Pre-vista & post-Vista currently the same as packages not implemented...
[DriverInstall]
CopyFiles=@MyPrinter.dll,@MyPrinter.gpd,@RukUSB.dll
DataFile=MyPrinter.gpd
Include=NTPRINT.INF
DataSection=UNIDRV_DATA
Needs=UNIDRV.OEM,UNIDRV_DATA,TTFSUB.OEM

; Install port monitor
; (Didn't make any difference)
;[PortMonitors]
;"MyPrinter_Port" = MyPrinter_Port
;
;[MyPrinter_Port]
;CopyFiles=@MyPrinter.dll,@MyPrinter.gpd,@RukUSB.dll
;PortMonitorDll = MyPrinter.dll

[DestinationDirs]
DefaultDestDir=66000

[SourceDisksNames.x86]
1 = %MediaDescription%,,,"I386"

[SourceDisksFiles]
MyPrinter.gpd = 1
MyPrinter.dll = 1
RukUSB.dll = 1

[Strings]
MediaDescription = "Ruk Printer driver disk"
Ruk = "My Printers"
Posted
Updated 6-Aug-10 22:21pm
v2

It will not load, because it is not signed. You will have to make Vista/Windows 7 boot up in so called 'test mode'. Google on it, and you will find plenty of articles showing you how to do this.
 
Share this answer
 
Thank you Jorgen, it works !

Certificates and "test certificates" fully implemented.

Converting from XP to Windows 7 is a complicated process due to the above, and as the Spooler service process can no longer access the user screen. I begin now the next phase which is to separate the GUI from the driver code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900