WLX: DefPrinter name on ListPrint()
Moderators: Hacker, petermad, Stefan2, white
WLX: DefPrinter name on ListPrint()
I have FreePDF installed and set as default printer. If I use the default printer for any lister plugin ListPrint() is called with DefPrinter = FreePDF. If I change the printer to any other printer in the Print setup of the lister and change it back to FreePDF then ListPrint() is called with the full name DefPrinter = FreePDF on FreePDFXP1:. This happens for any printer which is not the default printer. In result CreateDC() fails with ERROR_INVALID_PRINTER_NAME since the full name is not a valid printer name.
See wlx_solidworks.cpp, line 617 for my example.
Could the DefPrinter argument be changed to be either NULL or a valid printer name?
See wlx_solidworks.cpp, line 617 for my example.
Could the DefPrinter argument be changed to be either NULL or a valid printer name?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Does this happen only with FreePDF as the printer? Or also with normal printers when you change the default while TC is running?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
It happens with every printer. E.g. DefPrinter = Lexmark T644 (MS) if it is the default printer or DefPrinter = Lexmark T644 (MS) on 198.51.100.42 if it is not set as default. In the first case CreateDC() succeeds in second case it fails.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Interesting, it seems that Delphi is reporting bad printer names to TC in this case. I will check whether I can do anything about it. Does printing in Lister or compare by contents still work?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Do you mean in TC 8 beta 1?ghisler(Author) wrote:Does printing in Lister or compare by contents still work?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I mean in the version for which you report this problem. I wonder that when the plugin gets the wrong printer, does that printer still work in Lister, or does it fail too...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Lister (without plugin) works since it displays the default printer dialog where printer name can be changed again. The active printer name is the one set by the Print setup dialog (as expected).
Lister Print dialog: Image: http://tbeu.de/forum/Print.png
Lister Print Setup dialog:Image: http://tbeu.de/forum/PrintSetup.png
Lister Print dialog: Image: http://tbeu.de/forum/Print.png
Lister Print Setup dialog:Image: http://tbeu.de/forum/PrintSetup.png
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately I cannot reproduce it - I checked it in the debugger both with the 32-bit and the 64-bit version.
What I noticed is that TC checked the default printer only when you started it. So when you had printer1 as the default when starting TC, and then changed it to printer2, TC was still sending printer1 to the plugin. Also after changing from printer1 to printer2 and back, TC still sends printer1 here.
I'm on Windows 7 x64, what Windows version do you use?
What I noticed is that TC checked the default printer only when you started it. So when you had printer1 as the default when starting TC, and then changed it to printer2, TC was still sending printer1 to the plugin. Also after changing from printer1 to printer2 and back, TC still sends printer1 here.
I'm on Windows 7 x64, what Windows version do you use?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Where did you change the printer? In the Control Panel | Printers configuration or in Lister | Menu Print setup? I guess you checked first case whereas I checked second one.ghisler(Author) wrote:and then changed it to printer2
Same OS for me.ghisler(Author) wrote:I'm on Windows 7 x64, what Windows version do you use?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, I changed the default printer in Control Panel | Printers. You can't change the default printer in Lister | Menu Print setup, this only changes the printer within Total Commander.
I will check what happens when I change it in Lister | Menu Print setup. Unfortunately it's too late for beta 2 now, but I will try to fix it in a later beta if I can reproduce it.
I will check what happens when I change it in Lister | Menu Print setup. Unfortunately it's too late for beta 2 now, but I will try to fix it in a later beta if I can reproduce it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Could you reproduce? I checked with TC8PB5 and got same behaviour as mentioned above.ghisler(Author) wrote:I will try to fix it in a later beta if I can reproduce it.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately I could not reproduce it. The name is correct after changing the printer within Total Commander. Tested on Windows 7 with 32-bit and 64-bit version.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Can anyone please reproduce and confirm? Image: http://tbeu.de/forum/DefPrinter.png
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- fenix_productions
- Power Member
- Posts: 1979
- Joined: 2005-08-07, 13:23 UTC
- Location: Poland
- Contact:
2tbeu
I did not check the code but I can see changed printers names:
http://fenixproductions.pl/files/tc/printer.png
I did not check the code but I can see changed printers names:
http://fenixproductions.pl/files/tc/printer.png
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...
#128099
#128099