Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Get printer drivers directory
Use GetPrinterDriverDirectory function for solving of this problem.Don't forget include WinSpoon to uses chapter.
uses WinSpool;
...
procedure TForm1.Button1Click(Sender: TObject);
var
NewDevMode: TDeviceModeA;
MyDir: PChar;
Int: Integer;
begin
GetMem(MyDir, 500);
GetPrinterDriverDirectory(nil, nil, 1, MyDir, 200, Int);
Label1.Caption:=StrPas(MyDir);
FreeMem(MyDir);
end;
-
More for developers