I have found a bug in the unit winprinters.inc line 906
function TWinPrinter.GetPrinterType: TPrinterType;
var
Size: Dword;
InfoPrt: Pointer;
begin
Result := ptLocal;
//On Win9X all printers are local
if Win32Platform <> VER_PLATFORM_WIN32_NT then Exit;
GetPrinter(fPrinterHandle, 4, nil, 0, @Size);
GetMem(InfoPrt, Size);
try
if not GetPrinter(fPRinterHandle, 4, InfoPrt, Size, @Size)
then
raise EPrinter.CreateFmt('GetPrinterType failed : %s',
[SysErrorMessage(GetLastError)]);
if PPRINTER_INFO_4(InfoPrt)^.Attributes = PRINTER_ATTRIBUTE_NETWORK then
Result := ptNetwork;
finally
FreeMem(InfoPrt);
end;
end;
Must be say
if PPRINTER_INFO_4(InfoPrt)^.Attributes AND PRINTER_ATTRIBUTE_NETWORK = PRINTER_ATTRIBUTE_NETWORK then
Always return ptLocal