View Issue Details

IDProjectCategoryView StatusLast Update
0025315LazarusPackagespublic2014-01-11 15:07
ReporterBart Broersma Assigned ToBart Broersma  
Status closedResolutionfixed 
Product Version1.2.0RC1 
Target Version1.2.0 
Summary0025315: Unicode changes in printer package breaks printer usage on Win9x platform
DescriptionRecent changes to printers package have made this unit unusable for
Win9x systems by default.
Making it work depends on changing the defines in the printer4lazarus package.
(Same goes for trunk)
Steps To ReproduceRun the selectprinter project (in components\printers\samples\dialogs) on Win9x machine.
No printers will be detected.
No dialogs will be shown.
Additional InformationJust my opinion.

As long as we support Win9x, IMHO this is not a very nice thing to do.
In other components (e.g. Windows file routines) we have preserved
functioning for both Win9x and WinNT platform (at runtime it is
determined what to call).

Furthermore I think that when (note: I did not say "if") we say
goodbye to Win98 legacy code, we need to do that in a major release
and announce it properly, not just sneak that in.
Better still, it should be somewhere on the roadmap.

See also LazarusDev mailingslist for further argumentation.
TagsNo tags attached.
Fixed in Revisionr43544, r43553, r43554
Attached Files


Bart Broersma

2013-11-13 00:28

developer   ~0071295

Target 1.2 since I consider this to be a regression.

Bart Broersma

2013-11-21 18:46

developer   ~0071471

This makes no sense to me at all?


function TWinPrinter.GetDefaultPrinter: string;
  // retrieve default printer using ms blessed method, see
  // see:;en-us;246772
  Result := '';
  if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then
    // Get PRINT_INFO_2 record size
    BoolRes := EnumPrintersW(PRINTER_ENUM_DEFAULT, nil, 2, nil, 0, @Needed, @PrtCount);
    BoolRes := EnumPrinters(PRINTER_ENUM_DEFAULT, nil, 2, nil, 0,
                              @Needed, @PrtCount);

Why would you call the EnumPrintersW by default when you already know you are NOT on NT platform?
(From MS site: "VER_PLATFORM_WIN32_WINDOWS, or 0x0001, to specify Windows 95, Windows 98, or operating systems descended from them.")

Bart Broersma

2013-12-15 17:30

developer   ~0071904

Commited in trunk (r43544).
Needs testing before merging to 1.2 branch.

Bart Broersma

2013-12-16 23:01

developer   ~0071927

Compilation for fpc > 2.6.2 fixed in r43553 and r43554.

Bart Broersma

2013-12-24 19:35

developer   ~0072035

Tested on Win98SE (VM)

Issue History

Date Modified Username Field Change
2013-11-13 00:26 Bart Broersma New Issue
2013-11-13 00:28 Bart Broersma LazTarget - => 1.2
2013-11-13 00:28 Bart Broersma Note Added: 0071295
2013-11-21 18:46 Bart Broersma Note Added: 0071471
2013-12-15 17:29 Bart Broersma Assigned To => Bart Broersma
2013-12-15 17:29 Bart Broersma Status new => assigned
2013-12-15 17:30 Bart Broersma Note Added: 0071904
2013-12-16 23:01 Bart Broersma Note Added: 0071927
2013-12-24 19:35 Bart Broersma Fixed in Revision => r43544, r43553, r43554
2013-12-24 19:35 Bart Broersma Note Added: 0072035
2013-12-24 19:35 Bart Broersma Status assigned => resolved
2013-12-24 19:35 Bart Broersma Resolution open => fixed
2014-01-11 15:07 Bart Broersma Status resolved => closed