On Fri, 5 Mar 2021 03:42:29 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp line 136:
>>
>>> 134:
>>> 135: try {
>>> 136: ::EnumPrinters(flags, NULL, 4, NULL,
>>
>> Don't we need to check that this method call succeeds? Probably it is a
>> crash reason when the EnumPrinters fails but we use cbNeeded anyway for
>> array allocation?
>
> I guess since we are changing this method anyway, can we use
> PRINTER_ENUM_CONNECTIONS flag instead of hardcoded 4 so that it is more
> informative!!
ok, it is for flags and not for level. please ignore
-------------
PR: https://git.openjdk.java.net/jdk/pull/2836