关于KOL中的控件安装报错问题!(200分)

  • 主题发起人 主题发起人 shang_yan
  • 开始时间 开始时间
S

shang_yan

Unregistered / Unconfirmed
GUEST, unregistred user!
由于我的软件需要将体积控制得极小,所以用kol&mck开发。kol的核心库及标准控件我都顺利安装好了。但由于要用到附加的mckhttp控件,可安装中问题提示:Duplicate Resource(s),安装无法继续下去,有高手能指点一下么?
另外,我还尝试了附带的其它控件,均有此现象,为什么?如何解决?
 

{$$ xxxx.res}的语句,注释掉,再看。因为可能两个不同文件引用了相同的资源编译而报错的。
 
下面是这个控件的代码,根本没有引用资源文件的语句。还有其它可能吗,特别是装过这个控件的人,能帮帮我吗?

unit mckSocket;

interface

uses
Windows, Classes, Messages, Winsock, Forms, SysUtils,
KOLSocket, mirror;

type

TSocketMessageEvent = procedure (SocketMessage: TWMSocket) of object;

TKOLSocket = class(TKOLObj)
private
fIPAddress: string;
fPortNumber: word;
FOnError: TSocketMessageEvent;
FOnAccept: TSocketMessageEvent;
FOnClose: TSocketMessageEvent;
FOnConnect: TSocketMessageEvent;
FOnRead: TSocketMessageEvent;
FOnWrite: TSocketMessageEvent;
FOnListen: TSocketMessageEvent;
FOnOOB: TSocketMessageEvent;
protected
function AdditionalUnits: string; override;
procedure SetupFirst( SL: TStringList; const AName, AParent, Prefix: String ); override;
procedure SetupLast( SL: TStringList; const AName, AParent, Prefix: String ); override;
procedure AssignEvents( SL: TStringList; const AName: String ); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;

function GetPortNumber: LongInt;
function GetIPAddress: String;

procedure SetPortNumber(NewPortNumber: LongInt);
procedure SetIPAddress(NewIPAddress: String);

procedure SetOnAccept(Value: TSocketMessageEvent);
procedure SetOnClose(Value: TSocketMessageEvent);
procedure SetOnConnect(Value: TSocketMessageEvent);
procedure SetOnError(Value: TSocketMessageEvent);
procedure SetOnListen(Value: TSocketMessageEvent);
procedure SetOnOOB(Value: TSocketMessageEvent);
procedure SetOnRead(Value: TSocketMessageEvent);
procedure SetOnWrite(Value: TSocketMessageEvent);

published
property IPAddress: String read GetIPAddress write SetIPAddress;
property PortNumber: LongInt read GetPortNumber write SetPortNumber;
property OnError: TSocketMessageEvent read FOnError write SetOnError;
property OnAccept: TSocketMessageEvent read FOnAccept write SetOnAccept;
property OnClose: TSocketMessageEvent read FOnClose write SetOnClose;
property OnConnect: TSocketMessageEvent read FOnConnect write SetOnConnect;
property OnRead: TSocketMessageEvent read FOnRead write SetOnRead;
property OnWrite: TSocketMessageEvent read FOnWrite write SetOnWrite;
property OnOOB: TSocketMessageEvent read FOnOOB write SetOnOOB;
property OnListen: TSocketMessageEvent read FOnListen write SetOnListen;
end;

procedure Register;

implementation

{$R *.dcr}

constructor TKOLSocket.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
InstanceCount := InstanceCount + 1;
end; // constructor TKOLSocket.Create

destructor TKOLSocket.Destroy;
begin
inherited Destroy;
end; // destructor TKOLSocket.Destroy;

function TKOLSocket.GetIPAddress: String;
begin
Result := fIPAddress;
end; // function TKOLSocket.GetIPAddress: String

function TKOLSocket.GetPortNumber: LongInt;
begin
Result := fPortNumber;
end; // function TKOLSocket.GetPortNumber: Word

procedure TKOLSocket.SetIPAddress(NewIPAddress: String);
begin
fIPAddress := NewIPAddress;
Change;
end; // procedure TKOLSocket.SetIPAddress(NewIPAddress: String)

procedure TKOLSocket.SetPortNumber(NewPortNumber: LongInt);
begin
fPortNumber := NewPortNumber;
Change;
end; // procedure TKOLSocket.SetPortNumber(NewPortNumber: Word)

procedure TKOLSocket.SetOnAccept;
begin
fOnAccept := Value;
Change;
end;

procedure TKOLSocket.SetOnClose;
begin
fOnClose := Value;
Change;
end;

procedure TKOLSocket.SetOnConnect;
begin
fOnConnect := Value;
Change;
end;

procedure TKOLSocket.SetOnError;
begin
fOnError := Value;
Change;
end;

procedure TKOLSocket.SetOnListen;
begin
fOnListen := Value;
Change;
end;

procedure TKOLSocket.SetOnOOB;
begin
fOnOOB := Value;
Change;
end;

procedure TKOLSocket.SetOnRead;
begin
fOnRead := Value;
Change;
end;

procedure TKOLSocket.SetOnWrite;
begin
fOnWrite := Value;
Change;
end;

function TKOLSocket.AdditionalUnits;
begin
result := ', KOLSocket';
end;

procedure TKOLSocket.SetupFirst(SL: TStringList; const AName,
AParent, Prefix: String);
begin
SL.Add( Prefix + AName + ' := NewAsyncSocket;' );
SL.Add( Prefix + AName + '.PortNumber := ' + inttostr(fPortNumber) + ';');
SL.Add( Prefix + AName + '.IPAddress := ''' + fIPAddress + ''';');
end;

procedure TKOLSocket.SetupLast(SL: TStringList; const AName,
AParent, Prefix: String);
begin
//
end;

procedure TKOLSocket.AssignEvents(SL: TStringList; const AName: String);
begin
inherited;
DoAssignEvents( SL, AName,
[ 'OnConnect', 'OnAccept', 'OnListen', 'OnRead', 'OnWrite', 'OnOOB', 'OnClose', 'OnError' ],
[ @OnConnect , @OnAccept , @OnListen , @OnRead , @OnWrite , @OnOOB , @OnClose , @OnError ]);
end;

procedure Register;
begin
RegisterComponents('KOLUtil', [TKOLSocket]);
end;

end.
 
将{$R *.dcr}注释掉。
 
注释掉了那个语句,原来的问题解决了,又出现了这个错误:
[Error] Never-build package 'mckSocket_d7' requires always-build package 'MirrorKOLPackageD7'
我试了很多办法,解决不了,高手请赐教!一定给分
 
多人接受答案了。
 
用kol_mck的朋友可以加我QQ:8022820
 
后退
顶部