Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hello
 
I developed a Printer port monitor for virtual printer. I am installing it using script that stop spooler service and make entries in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\ and start the spooler service. If everything goes fine then the Port will be created. Then I install my printer on that port using INF.
 
I compiled port monitor DLL for 32bit and 64bit environment. The complete installation script was working with XP and Win 7 (both 32 and 64 bit).
But when I try to install in Win 7 sp1 it gives me error of "operation could not be completed (error 0x00000704) The specified port is unknown".
 
I thought that this issue occurs while creating a port. So i tried to install port monitor manually as said in following link
 
http://msdn.microsoft.com/en-us/library/windows/hardware/ff551668%28v=vs.85%29.aspx
 
But it also fails; I checked the application log and find the following error
 
"The print spooler failed to load a plug-in module Printer.dll, error code 0x7e. See the event user data for context information."
 
so this shows that the problem with the port monitor DLL. I developed the DLL in VS2010 in C++ language with Print API. I compiled the DLL for 32bit and 64bit by selecting the Platform x64(for 64bit) and win32(for 32bit). Is there any other compile configuration for win7 sp1?
 
I searched about this and found the following article but for real printer.
 
http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/unable-to-print-to-any-printer-error-0x7e/723a7032-c245-e011-9575-d8d385dcbb12
 

I need help to solve this issue for win7 sp1 print port monitor.
 

Thank you.
Jaydeep Jadav
Posted 30-Jun-12 1:51am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I don't know if you're still looking for this, but to benefit others who are in the same boat, I will say what I've found here...
 
This also got broken in Server 2008 R2 SP1, likely for the same reason. What has happened is that apparently the dirid 66002 was somehow invalidated, so specifying 66002 as the destination directory for your port monitor files in the INF file causes them to be copied to the C:\ directory instead. Then when it tries to access the port monitor module, you get error 126 (module not found) because the module is not in the system32 directory.
 
To fix this, you have to change the destination dirid in your printer INF file for your port monitor files to 11 (System32 directory).
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 21 Nov 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100