H
hgptm
Unregistered / Unconfirmed
GUEST, unregistred user!
我代碼如下:
unit DataInterFace;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,ScktComp;
type
TDummy = class
class Procedure OnGetThread(Sender: TObject; ClientSocket: TServerClientWinSocket; var SocketThread: TServerClientThread);
end;
TSerSck = Class
private
public
SerSckt: TServerSocket;
constructor Create;
destructor Destroy; override;
end;
implementation
class Procedure TDummy.OnGetThread(Sender: TObject; ClientSocket: TServerClientWinSocket; var SocketThread: TServerClientThread);
begin
SHowmessage('hellow');
end;
constructor TSerSck.Create;
begin
inherited Create;
SerSckt.Active := false; //問題在這里(執行總是出錯)..[]
SerSckt.Port := 8888;
SerSckt.ServerType := stThreadBlocking;
SerSckt.Active := true;
end;
destructor TSerSck.Destroy;
begin
//
inherited;
end;
end.
unit DataInterFace;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,ScktComp;
type
TDummy = class
class Procedure OnGetThread(Sender: TObject; ClientSocket: TServerClientWinSocket; var SocketThread: TServerClientThread);
end;
TSerSck = Class
private
public
SerSckt: TServerSocket;
constructor Create;
destructor Destroy; override;
end;
implementation
class Procedure TDummy.OnGetThread(Sender: TObject; ClientSocket: TServerClientWinSocket; var SocketThread: TServerClientThread);
begin
SHowmessage('hellow');
end;
constructor TSerSck.Create;
begin
inherited Create;
SerSckt.Active := false; //問題在這里(執行總是出錯)..[]
SerSckt.Port := 8888;
SerSckt.ServerType := stThreadBlocking;
SerSckt.Active := true;
end;
destructor TSerSck.Destroy;
begin
//
inherited;
end;
end.