On 2/15/2018 1:16 PM, Remy Lebeau (TeamB) wrote:
Jeff Overcash (TeamB) wrote:
{$IF DEFINED(UNICODE) AND DEFINED(MSWINDOWS)}
function GetDefaultPrinter(DefaultPrinter: PChar; var I: Integer):
BOOL; stdcall; external winspl name 'GetDefaultPrinterW';
{$ENDIF}
I wonder why TPrinter resorted to using GetProfileString() in ANSI
builds and not use GetDefaultPrinterA() instead?
No idea, but that way you can find in google back in 2002 so I just assume old
legacy code that no one ever looked at to update. The signature for
GetDefaultPrinter (the Integer signature isn't a Var, but an int pointer IIRC
from looking at it earlier) is slightly different so instead of playing with it
to use the WinSpool definition I just did exactly what was going on in Printers.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Connect with Us