Delphi-PRAXiS
Seite 2 von 3     12 3      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Read Error bei dll (https://www.delphipraxis.net/11249-read-error-bei-dll.html)

Luckie 4. Nov 2003 10:06

Re: Read Error bei dll
 
Zitat:

Zitat von sharkx
Luckie, die hat sie ja ... mIRC.
Übergeben wird es so.

//dll meine.dll dieFunction dieParameter

Bitte was?

sharkx 4. Nov 2003 10:09

Re: Read Error bei dll
 
die dll hat eine Hostanwendung, mIRC.

Diese wird wie folgt aufgerufen.. //dll meine.dll ShowMSG MeineParameter

Hoffe du hast es verstanden ;-)

Luckie 4. Nov 2003 10:11

Re: Read Error bei dll
 
Nein. Wo wird die so aufgerufen? Kommandozeile?

sharkx 4. Nov 2003 10:23

Re: Read Error bei dll
 
joa .. Kommandozeile

Luckie 4. Nov 2003 10:28

Re: Read Error bei dll
 
Und was bedeutet:
Code:
..//dll

sharkx 4. Nov 2003 10:37

Re: Read Error bei dll
 
aus der Hilfe ...

Zitat:

/dll <filename> <procname> [data]
$dll(filename, procname, data)

$dllcall(filename, alias, procname, data)


The above open a DLL, call the procname routine, and send it the specified data. The only difference is that $dll() can return a value, like all other identifiers.

$dllcall() is multi-threaded so it will not halt the script and will call the specified alias once the call returns.

scp 4. Nov 2003 11:34

Re: Read Error bei dll
 
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;

sharkx 4. Nov 2003 11:45

Re: Read Error bei dll
 
gleicher fehler, bzw die variablen bleiben leer.

ich hab auch meinen dll aufruf von verschiednene IRC Scripter überprüfen lassen. Der stimmt 100%.

scp 4. Nov 2003 11:48

Re: Read Error bei dll
 
Sorry, habs nochmal von "parms" in "data" geändert.

In der Hilfe steht:

Zitat:

data is the information that you wish to send to the DLL. On return, the DLL can fill this variable with the command it wants mIRC to perform if any.

sharkx 4. Nov 2003 12:00

Re: Read Error bei dll
 
Jap .. danke .. so funktioniert es :))


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:33 Uhr.
Seite 2 von 3     12 3      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz