Home > Back-end >  Excuse me: how to programmatically access password printer (namely the printer itself is equipped wi
Excuse me: how to programmatically access password printer (namely the printer itself is equipped wi

Time:12-08

Excuse me: how to programmatically access password printer (namely the printer itself is equipped with the user name, password)??
Thank you very much!

CodePudding user response:

Like direct electrophoresis is ok, but the password input box will appear

CodePudding user response:

The problem of the niche, the more need on the picture, on a variety of materials

CodePudding user response:

The printer is without a user name and password, your problem, may be a network share printers, as printer server login permissions issues,

CodePudding user response:

 procedure TForm1. ConnectServer; 
Var
NetSource: TNetResource;
The begin
With NetSource do
The begin
DwType:=RESOURCETYPE_ANY;
LpLocalName:=';//to a remote resource mapping to the drive
LpRemoteName:='\ \ 192.168.0.1 \ picbook';//remote network resources
LpProvider:=';
end;
WnetAddConnection2 (NetSource, "aaaa", "Administrator", CONNECT_UPDATE_PROFILE);
end;

With access to the network first, and then print directly,

CodePudding user response:

He said should be a network printer, not connect the computer on the network Shared printer, but itself can be directly hung on the printer on the network (switches or routers),
You can use WNetAddConnection2 or WNetAddConnection3,

CodePudding user response:

Thank you first! Problems such as DelphiGuy said
  • Related