Added PRINTER_INFO_2 support and GetPrinter function#569
Added PRINTER_INFO_2 support and GetPrinter function#569dblock merged 4 commits intojava-native-access:masterfrom
Conversation
|
Don't change the whole tabs vs. spaces thing, looks like your editor brought a bunch of extra changes here. The new mappings need tests, please. Update CHANGELOG. |
|
I just updated the changelog. Also, I reduced the changes made by the editor (eclipse). You can test for (PRINTER_INFO_2 printerInfo : WinspoolUtil.getPrinterInfo2()) {
System.out.println(printerInfo.pPrinterName + ": " + printerInfo.pDriverName);
}
System.out.println("---ALL---");
for (PRINTER_INFO_2 printerInfo : WinspoolUtil.getAllPrinterInfo2()) {
System.out.println(printerInfo.pPrinterName + ": " + printerInfo.pDriverName);
}
System.out.println("---BY NAME---");
PRINTER_INFO_2 printerInfo = WinspoolUtil.getPrinterInfo2("Adobe PDF");
System.out.println(printerInfo.pPrinterName + ": " + printerInfo.pDriverName);I just added the modified JNA classes to my project to test it. I don't know how to make an specific test inside JNA. |
There was a problem hiding this comment.
Please make this look like the lines below. The class names are usually included with the full name like com.sun..., not everybody uses Windows.
|
You need actual tests for these methods. Even something basic that expects a certain return code or expects at least some data. |
|
Please also squash multiple commits, thanks. |
|
For the code in |
|
WRT exception handling, it's possible old code didn't do this right, everything that can fail should be checked and raise an exception. |
|
I added a check for The return value for the first call to If an exception is added there, it will always throw it. I tested it. |
There was a problem hiding this comment.
The syntax of your line and the one below is different, it's - [@](...)., if you don't mind fixing please.
|
Makes sense WRT the This still needs tests. |
|
Fixed the syntax in CHANGED.md, I used the first entry as example but was wrong and I had followed that. I corrected both. |
|
Still needs tests and a rebase. |
|
@dblock rebase done. |
4eb408f to
5bbf48b
Compare
|
i am cool with this, merging. |
Added PRINTER_INFO_2 support and GetPrinter function
|
Thanks! 👍 |
Issue #568