Thema: Delphi Read Error bei dll

Einzelnen Beitrag anzeigen

scp

Registriert seit: 31. Okt 2003
1.120 Beiträge
 
Delphi 7 Personal
 
#17

Re: Read Error bei dll

  Alt 4. Nov 2003, 12:34
Probier mal das:

Delphi-Quellcode:
function ShowMSG( mWnd: hWnd; aWnd: hWnd; Data: PChar; Parms: PChar;
Show: Boolean; NoPause: Boolean ): Integer; export; stdcall;
var
  i: Integer;
  s: string;
  slist : TStringList;
begin
    s := Trim(StrPas(Data));
    slist := TStringList.Create;
    try
      while (Pos('-', s) = 1) do
        begin
          slist.Add(Copy(s, 1, Pos(' ', s)-1));
          Delete(s, 1, Pos(' ', s));
          s := Trim(s);

          If (s[1] = '"') then
            begin
              Delete(s, 1, 1);
              slist.Add(Copy(s, 1, Pos('"', s) - 1));
              Delete(s, 1, Pos('"', s));
            end
          else
          If (Pos(' ', s) > 0) then
            begin
              slist.Add(Copy(s, 1, Pos(' ', s)-1));
              Delete(s, 1, Pos(' ', s));
            end
          else
            begin
              slist.Add(s);
              s := '';
            end;

          s := Trim(s);
        end;

      for i := 0 to (slist.Count-1) do
      begin
        if (slist[i] = '-FPath') then
          FPath := PChar(slist[i+1]);
        if (slist[i] = '-Source') then
          Source := PChar(slist[i+1]);
        if (slist[i] = '-SPath') then
          SPath := PChar(slist[i+1]);
        if (slist[i] = '-Target') then
          Target := PChar(slist[i+1]);
        if (slist[i] = '-TPath') then
          TPath := PChar(slist[i+1]);
        if (slist[i] = '-Release') then
          Release := PChar(slist[i+1]);
        if (slist[i] = '-FQF') then
          FQF := PChar(slist[i+1]);
        if (slist[i] = '-IFQF') then
          IFQF := PChar(slist[i+1]);
      end;
    finally
      slist.Free;
    end;

ShowMessage('FQF ' + ' ' + FQF + #10'Source ' + Source + ' ' + #10'SPath ' + SPath + ' ' + #10'Target ' + Target + ' ' + #10'TPath ' + TPath + ' ' + #10'Release ' + Release + ' ' + #10'IFQF ' + IFQF + ' ' + #10'FPath ' + FPath);
Result := 0;
end;
  Mit Zitat antworten Zitat