Ich blick es nicht
Was mache ich falsch, es kommt hier nun immer der Errocode 100
Kann vielleicht mal jemand Source testen?
Delphi-Quellcode:
procedure TForm1.Button2Click(Sender: TObject);
var
ArgV:
Array of PAnsiChar;
instance: Pointer;
x, code: Integer;
xArgV: PPAnsiChar;
begin
code := gsapi_new_instance(instance,
nil);
if code < 0
then
raise Exception.Create
('
Impossible to open an instance of ghostscript. Error code: ' +
IntToStr(code));
setlength(ArgV, 4);
ArgV[0] := PAnsiChar('
-dNOPAUSE' + #0);
ArgV[1] := PAnsiChar('
-sDEVICE=pdfwrite' + #0);
ArgV[2] := PAnsiChar('
-sOUTPUTFILE="' + JvFilenameEdit3.Text + '
"' + #0);
ArgV[3] := PAnsiChar('
-dBATCH ' + '
"' + JvFilenameEdit1.Text + '
"' + '
' + '
"'
+ JvFilenameEdit2.Text + '
"' + #0);
code := gsapi_init_with_args(instance, Length(ArgV), @ArgV);
if code < 0
then
raise Exception.Create('
ERROR: init_args: ' + IntToStr(code));
gsapi_exit(instance);
showmessage('
fertig!');
end;
Ich verzweifle