Delphi 3.0:
所有控件的属性均为默认值:
procedure TForm1.NewLink1Click(Sender: TObject);
begin
DdeClientConv1.SetLink('WinFIOL','Channel #2');
DdeClientItem1.DdeConv:=DdeClientConv1;
DdeClientItem1.DDeItem:='Output';
end;
procedure TForm1.DdeClientItem1Change(Sender: TObject);
begin
Memo1.Lines.Add(DdeClientItem1.Text);
end;
{
procedure TForm1.Button1Click(Sender:TObject);
begin
DdeClientConv1.SetLink('WinFIOL','Channel #2');
DdeClientItem1.DdeConv:=DdeClientConv1;
DdeClientItem1.DDeItem:='Output';
end;
}
程序输出:
<rlcrp:cell=dyg109a;
CELL BCCH CBCH SDCCH NOOFTCH
DYG109A 1 0 8 6
BPC CHANNEL CHRATE SPV STATE ICMBAND
2767 BCCH-34748 BUSY
2764 SDCCH-33919 IDLE 1
SDCCH-33918 IDLE 1
SDCCH-33917 IDLE 1
SDCCH-33916 IDLE 1
SDCCH-33915 IDLE 1
SDCCH-33914 IDLE 1
SDCCH-33913 IDLE 1
SDCCH-33912 IDLE 1
2761 TCH-6732 FR 1 IDLE 1
2760 TCH-6731 FR 1 BUSY 1
2759 TCH-6730 FR 1 BUSY 1
2758 TCH-6729 FR 1 BUSY 1
2757 TCH-6652 FR 1 IDLE 1
END
END
VB5.0:
所有控件的属性均为默认值:
MemoX为Delphi 3.0中的TMemo的OCX控件:
Private Sub Command1_Click()
Label1.LinkTopic = "WinFIOL|Channel #2"
Label1.LinkItem = "Output"
Label1.LinkMode = 1
End Sub
Private Sub Label1_Change()
MemoX1.Lines.Add (Label1.Caption)
End Sub
程序输出:
<rlcrp:cell=dyg109a;
CELL RESOURCES
CELL BCCH CBCH SDCCH NOOFTCH
DYG109A 1 0 8 6
BPC CHANNEL CHRATE SPV STATE ICMBAND
2767 BCCH-34748 BUSY
2764 SDCCH-33919 IDLE 1
SDCCH-33918 IDLE 1
SDCCH-33917 IDLE 1
SDCCH-33916 IDLE 1
SDCCH-33915 IDLE 1
SDCCH-33914 IDLE 1
SDCCH-33913 IDLE 1
SDCCH-33912 BUSY 1
2761 TCH-6732 FR 1 IDLE 1
2760 TCH-6731 FR 1 IDLE 1
2759 TCH-6730 FR 1 BUSY 1
2758 TCH-6729 FR 1 IDLE 1
2757 TCH-6652 FR 1 BUSY 1
2756 TCH-6651 FR 1 IDLE 1
END
WinFIOL.exe标准输出:
<rlcrp:cell=dyg109a;
CELL RESOURCES
CELL BCCH CBCH SDCCH NOOFTCH
DYG109A 1 0 8 6
BPC CHANNEL CHRATE SPV STATE ICMBAND
2767 BCCH-34748 BUSY
2764 SDCCH-33919 IDLE 1
SDCCH-33918 IDLE 1
SDCCH-33917 IDLE 1
SDCCH-33916 IDLE 1
SDCCH-33915 IDLE 1
SDCCH-33914 IDLE 1
SDCCH-33913 IDLE 1
SDCCH-33912 IDLE 1
2761 TCH-6732 FR 1 IDLE 1
2760 TCH-6731 FR 1 BUSY 1
2759 TCH-6730 FR 1 BUSY 1
2758 TCH-6729 FR 1 BUSY 1
2757 TCH-6652 FR 1 IDLE 1
2756 TCH-6651 FR 1 IDLE 1
END
注意:
WinFIOL.exe的技术文档中说: 结果是以一行一行的出的.并且
A hot-link with the "Output" data item causes WinFIOL
to send every line it receives from the target exchange
to the client application. A line received is only sent
to the client application if it institutes a whole line,
i.e. when it is terminated by a carriage return. This means
that if only a prompt is received from the target exchange,
it is not sent to the client application. Establish
an "Event" hot-link to obtain this information.
WinFIOL messages that start with "##", as in "## End of
include file '<file>'"
are also sent to the client application.
并且我还发现一个怪现象:如果进行热连接的代码放在
Button1Click(Sender:TObject)间的,在程序运行时点击
Button1按钮程序出现的并不是热连接,而是Cool-link.
用WinSight32.exe得到的是WinFIOL程序不断地发出
DDE数据,而我的程序却一点反应都没有.