AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Problem: Indy-Thread und Pointer
Thema durchsuchen
Ansicht
Themen-Optionen

Problem: Indy-Thread und Pointer

Ein Thema von J_e_n_s · begonnen am 14. Jul 2009 · letzter Beitrag vom 14. Jul 2009
Antwort Antwort
samso

Registriert seit: 29. Mär 2009
439 Beiträge
 
#1

Re: Problem: Indy-Thread und Pointer

  Alt 14. Jul 2009, 17:38
vielleicht funktioniert dies (quick & dirty):

Delphi-Quellcode:
  TForm1
  ....
  private
    withandle: TwitHandle;
    procedure DoCloseWit;
    procedure DoStartWit;
  ...


procedure TForm1.DoCloseWit;
begin
  WitDllExit(withandle);
end;

procedure TForm1.DoStartWit;
begin
  withandle := witDLLInit4(Pointer(Handle), 0, nil, nil, 0, nil);
end;

...

procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
var
    Command : String;
    temp: String;
begin
  Command := AThread.Connection.ReadLn;
  Command := uppercase(Command);
  if (Command = 'LOADDLL') then [b]//starten[/b]
  begin
    AThread.Synchronize(DoStartWit);
    temp:='DLL_LOADED' + chr(10);
   AThread.Connection.Write(temp);
  end
  else if (Command = 'UNLOADDLL') then [b]//beenden[/b]
  begin
   AThread.Synchronize(DoStopWit);
   temp:='DLL_UNLOADED' + chr(10);
   AThread.Connection.Write(temp);
  end
  else
  begin
    temp:='NOK:UNKNOWN_COMMAND' + chr(10);
    AThread.Connection.Write(temp);
  end;
end;
Was ist, wenn mehrere Clients auf den Server zugreifen?
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:40 Uhr.
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