是否可以使用 `TDdeClientConv` class 枚举所有可用的 DDE 服务器?
Is it possible to enumerate all available DDE servers with `TDdeClientConv` class?
我对所有 运行 DDE 服务器都很好奇,尝试了 TDdeClientConv
class 但对它感到困惑(可能只是没有弄清楚如何),最后推出了我的自己的底层(通常应用程序应该使用 DDEML 抽象层)"client":
procedure TForm6.FormClick(Sender: TObject);
begin
{ initiate DDE conversation with all top-level windows }
SendMessage(
HWND_BROADCAST,
WM_DDE_INITIATE,
Handle,
MakeLParam(
0, // all services
0 // all topics
)
);
end;
procedure TForm6.WMDDE_Ack(var Message: TWMDDE_Ack);
begin
{ this message handler receives acknowledgements }
{ and prints service-topic pairs to console }
Writeln('"' + GetAtom(Message.App) + '"', #9, '"' + GetAtom(Message.Topic) + '"');
end;
问题:是否可以对TDdeClientConv
class做同样的事情,即发起与所有可用服务的DDE对话并接收多个确认?或者 TDdeClientConv
仅表示 DDE 对话的客户端端点,因此我的场景超出范围?
TDdeClientConv
不使用任何 window 消息,它使用 Dynamic Data Exchange Management Library (DDEML) instead. TDdeClientConv
can connect only to a single server that implements a specified Service and/or Topic, as it establishes its connection using the DDEML DdeConnect()
函数:
Establishes a conversation with a server application that supports the specified service name and topic name pair. If more than one such server exists, the system selects only one.
DDEML 的 DdeConnectList()
函数,另一方面,可以与支持给定服务 and/or 主题的多个服务器建立对话。
Establishes a conversation with all server applications that support the specified service name and topic name pair. An application can also use this function to obtain a list of conversation handles by passing the function an existing conversation handle. The Dynamic Data Exchange Management Library removes the handles of any terminated conversations from the conversation list. The resulting conversation list contains the handles of all currently established conversations that support the specified service name and topic name.
您可以使用 DdeQueryNextServer()
and DdeQueryConvInfo()
函数枚举该列表。
我对所有 运行 DDE 服务器都很好奇,尝试了 TDdeClientConv
class 但对它感到困惑(可能只是没有弄清楚如何),最后推出了我的自己的底层(通常应用程序应该使用 DDEML 抽象层)"client":
procedure TForm6.FormClick(Sender: TObject);
begin
{ initiate DDE conversation with all top-level windows }
SendMessage(
HWND_BROADCAST,
WM_DDE_INITIATE,
Handle,
MakeLParam(
0, // all services
0 // all topics
)
);
end;
procedure TForm6.WMDDE_Ack(var Message: TWMDDE_Ack);
begin
{ this message handler receives acknowledgements }
{ and prints service-topic pairs to console }
Writeln('"' + GetAtom(Message.App) + '"', #9, '"' + GetAtom(Message.Topic) + '"');
end;
问题:是否可以对TDdeClientConv
class做同样的事情,即发起与所有可用服务的DDE对话并接收多个确认?或者 TDdeClientConv
仅表示 DDE 对话的客户端端点,因此我的场景超出范围?
TDdeClientConv
不使用任何 window 消息,它使用 Dynamic Data Exchange Management Library (DDEML) instead. TDdeClientConv
can connect only to a single server that implements a specified Service and/or Topic, as it establishes its connection using the DDEML DdeConnect()
函数:
Establishes a conversation with a server application that supports the specified service name and topic name pair. If more than one such server exists, the system selects only one.
DDEML 的 DdeConnectList()
函数,另一方面,可以与支持给定服务 and/or 主题的多个服务器建立对话。
Establishes a conversation with all server applications that support the specified service name and topic name pair. An application can also use this function to obtain a list of conversation handles by passing the function an existing conversation handle. The Dynamic Data Exchange Management Library removes the handles of any terminated conversations from the conversation list. The resulting conversation list contains the handles of all currently established conversations that support the specified service name and topic name.
您可以使用 DdeQueryNextServer()
and DdeQueryConvInfo()
函数枚举该列表。