MySQL用户定义函数发送Windows消息 [英] MySQL User Defined Function to send a windows message
问题描述
G'Day,
我想从MySQL 5.1.51(XP SP3)上的MySQL UDF内部使用Windows API Postmessage()调用.我知道UDF(在Delphi中撰写,2006年)正在通过为UDF设置伪造的结果来工作.
I want to use the Windows API Postmessage() call from inside a MySQL UDF on MySQL 5.1.51 (XP SP3). I know the UDF (Written in Delphi 2006) is working by setting a bogus result for the UDF.
UDF的语法采用两个整数参数,一个用于窗口句柄,另一个用于消息号.但是,从我的UDF内部调用PostMessage()会导致mysqld发生异常,并且服务停止.
The syntax of the UDF takes two integer params, one for a window handle and the other for a message number. However a call to PostMessage() from inside my UDF causes an exception in mysqld and the service stops.
有什么想法或建议吗?另外,如果有人可以告诉我如何通过AnyDAC和Delphi模拟MySQL的IB事件,或者在数据库中的记录发生更改时获得通知的另一种方法,请告诉我.
Any ideas or pointers? Alternatively if anyone can tell me how I am able to simulate IB Events for MySQL via AnyDAC and Delphi OR an alternate approach to getting a notification when a record has changed in the database then please show me the light.
-多诺万(Donovan)
--Donovan
推荐答案
作为Windows消息或TCP/IP的替代方法,您可能需要考虑
As an alternative to windows messages or TCP/IP, you might want to consider the named pipes
answer to this question on sending information between two Delphi programs and this question on what named pipes are.
-jeroen
这篇关于MySQL用户定义函数发送Windows消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!