winexec() 를 이용해서 네트웍 프린터로 출력을 하려고 합니다.
var
aDevice, aPort, aDriver:PChar;
aHandle: THandle;
begin
GetMem(adevice,50);
GetMem(aport,50);
GetMem(adriver,50);
printer.GetPrinter(aDevice,aDriver,aPort,aHandle);
port:= Strpas(aport);
WinExec(PChar('cmd /c copy C:\FileName.plt ' + port), SW_SHOWNORMAL); -->실행안됨
WinExec(PChar('cmd /c copy C:\FileName.plt DOT4_001'), SW_SHOWNORMAL); ->실행안됨
위와같이 실행했을 경우 아무런 메시지도 없고 프린트도 되지 않습니다.
로컬프린터에서 다음코드를 실행할 경우는 이상없이 프린트 됩니다.
WinExec('cmd /c copy C:\FileName.plt LPT1, SW_SHOWNORMAL);
네트웍프린터에서 프린트 되게 할려면 어떻게 하면 될까요...?
고수님의 조언 부탁드립니다.
|