Y
yeo
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.N6Click(Sender: TObject);
var
i:integer;
Handle: LongWord;
N: DWORD;
do
cInfo1: TDocInfo;
pDocName : PChar;
pOutputFile : PChar;
pDataType : PChar;
rr : Byte;
gg : integer;
begin
if not OpenPrinter('Star AR-3200', Handle, 0) then
begin
ShowMessage('error' + IntToStr(GetLastError));
Exit;
end;
withdo
cInfo1do
begin
pDocName:='testdo
c';
pOutputFile:=PChar(nil);
pDataType:='RAW';
end;
rr := StartDocPrinter(Handle,1,@DocInfo1);
//问题就在这里
gg := handle;
edit1.Text := inttostr(rr);
edit2.Text := inttostr(gg);
………………
现在我无论打印机设置为哪个,返回的handle都是同一个值;
而且在startdocprinter返回的总是0,请问原因是什么????
该如何解决???
var
i:integer;
Handle: LongWord;
N: DWORD;
do
cInfo1: TDocInfo;
pDocName : PChar;
pOutputFile : PChar;
pDataType : PChar;
rr : Byte;
gg : integer;
begin
if not OpenPrinter('Star AR-3200', Handle, 0) then
begin
ShowMessage('error' + IntToStr(GetLastError));
Exit;
end;
withdo
cInfo1do
begin
pDocName:='testdo
c';
pOutputFile:=PChar(nil);
pDataType:='RAW';
end;
rr := StartDocPrinter(Handle,1,@DocInfo1);
//问题就在这里
gg := handle;
edit1.Text := inttostr(rr);
edit2.Text := inttostr(gg);
………………
现在我无论打印机设置为哪个,返回的handle都是同一个值;
而且在startdocprinter返回的总是0,请问原因是什么????
该如何解决???