关于Powerbuilder下DDE通讯的查询
我有一个可以发送或接收 DDE Poke 的第三方工具。我一直在使用 DDE 间谍来监视它与第 3 方 DDE 服务器模拟器之间的通信,以期使用 Powerbuilder 来复制它。据我所知,这是使用热链接。我尝试使用 openchannel,然后使用 execremote,但调用类型被描述为“执行”。 同样,当客户端和模拟器启动时,它们会出现在注册服务器列表中,但我的应用程序不会/ 我考虑过使用 user32.dll,但我知道大多数 DDE 调用无法与 Powerbuilder 一起使用,因为 PB 不支持回调。 有人可以向我指出有关该领域的信息吗? …… 经过一番调整后,我尝试打开一个热链接。单击应用程序上的“poke”按钮,我的 powerbuilder 会触发 hotlinkalarm 事件。我可以获取来源等,但没有数据。我还需要发回一条指令,但所有 respondremote 所做的就是发送 true 或 false。 我有一些来自 DDE 模拟器的 Delphi / Pascal 代码,但 DDE 调用看起来与 Powerbuilder 的调用相当不同。
I have a third party tool that can send or receive DDE pokes. I have been using DDE spy to monitor communications between it and a 3rd party DDE server emulator, with a view to replicate this using Powerbuilder. As far as I can tell, this is using warm links. I tried using openchannel, followed by execremote, but the type of call is described as 'execute'.
Likewise, when the client and the emulator start up, they appear in the list of registered servers, but my application doesn't/
I considered using user32.dll, but I understand that most of the DDE calls won't work with Powerbuilder since PB doesn't support callbacks.
Can anybody point me in the direction of information on this area?
.....
After a bit more tweaking, I tried opening a hotlink. Clicking the 'poke' button on the application, my powerbuilder has the hotlinkalarm event triggered. I can pick up the source etc, but no data. Also I need to send an instruction back, but all respondremote will do is send true or false.
I have some Delphi / Pascal code from the DDE emulator, but the DDE calls look rather different to the Powerbuilder ones.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你找到这个问题的答案了吗?我不确定我是否完全理解你在做什么,但我认为你需要考虑以下内容。
StartServerDDE 函数将您的应用程序建立为 DDE 服务器,请注意,您必须打开一个窗口作为 DDE 对话的句柄,然后编写窗口事件代码(应用程序级事件不起作用)。这可能就是您没有看到注册服务器的原因。结束 DDE 服务器时使用 StopServerDDE。
在DDE服务器窗口中编写以下事件代码,完成您所需要的数据的接收、发送,均为:
RemoteExec事件(客户端已发送请求)
使用 GetCommandDDE 获取客户端发送的命令字符串
使用 GetCommandDDEOrigin 查看哪个客户端应用程序名称发送了命令
RemoteSend 事件(客户端已发送数据)
使用 GetDataDDE 从客户端应用程序获取数据(通过引用字符串)
使用 GetDataDDEOrigin 查看哪个客户端应用发送了数据
RemoteRequest 事件(客户端已请求数据)
使用 SetDataDDE 将数据发送到您的客户端 DDE 应用程序
我希望这会有所帮助。
Did you find an answer for this? I'm not sure if I fully understand what you are doing, but here are things I think you need to look at.
StartServerDDE function establishes your application as a DDE server, note that you must have a window open as handle for DDE conversation, and then code window events (application level events won't work). This might be why you didn't see registered server. Use StopServerDDE when ending DDE server.
Code for the following events in DDE server window to accomplish receiving, sending data as your requirements need, all are :
RemoteExec event (client has sent a request)
Use GetCommandDDE to get a command string the client sent
Use GetCommandDDEOrigin to see what client application name sent the command
RemoteSend event (client has sent data)
Use GetDataDDE to get data (via ref string) from client application
Use GetDataDDEOrigin to see what client app sent the data
RemoteRequest event (client has requested data)
Use SetDataDDE to send data to your client DDE application
I hope this helps.