I’ve written an NT 4.0 Port Monitor that does everything I want it to do (thanks to some on these lists!) as long as I don’t reboot the machine.
When I install the port, it shows the name OurPrintMaster for Port and OurPrintMasterPort for the Description, as I would expect. I can then select the Configure Port button and my dialog box appears, allowing me to do as I wish.
When I reboot the machine, the name for Port is still shown as OurPrintMaster, but the Description shown is Local Port. I believe this is coming straight out of localmon.dll.
In the original localmon code, they do a CreatePortEntry() for every port that they find in InitializePrintMonitor. The machine I’m developing on has the standard Local Ports, as well as HP JetDirectPorts and LAN Manager Printer Ports.
I set SoftICE to start on boot, and I can see that InitializePrintMonitor, as well as EnumPorts are getting hit. The Local Ports seem to be found in InitializePrintMonitor, using the same code from localmon.
If I check to see that the name is OurPrintMaster before I do the CreatePortEntry, then the Description comes up correctly in Properties | Ports, yet when I hit the Configure Port button, I get the message from localmon saying there’s nothing to configure.
It seems to me I have not figured out how to correctly identify myself from with my port monitor DLL, and the (usually clear and accurate) MS docs don’t seem to help.
Can anybody tell me what I’m missing here? After a reboot, why isn’t my ConfigurePort function called when I hot the Configure Port button?
Thanks,
Steve