checkk printer driverdirectory by delphi |
Function to read the directory printer driver installed.
Function declaration:
PrinterDriverDir function: String;
var
DM: TDeviceModeA;
cDir: PChar;
i: DWORD;
begin
GetMem (cDir, MAX_PATH);
GetPrinterDriverDirectory (nil, nil, 1, cDir, 200, i);
Result: = StrPas (cDir);
FreeMem (cDir);
end;
Add WinSpool units in uses.
Example of implementation:
TForm1.FormCreate procedure (Sender: TObject);
begin
Edit1.Text: = PrinterDriverDir;
end;
Function declaration:
PrinterDriverDir function: String;
var
DM: TDeviceModeA;
cDir: PChar;
i: DWORD;
begin
GetMem (cDir, MAX_PATH);
GetPrinterDriverDirectory (nil, nil, 1, cDir, 200, i);
Result: = StrPas (cDir);
FreeMem (cDir);
end;
Add WinSpool units in uses.
Example of implementation:
TForm1.FormCreate procedure (Sender: TObject);
begin
Edit1.Text: = PrinterDriverDir;
end;
No comments:
Post a Comment