如何在DLL中共享数据段:问题: [英] How to share a data segment in a DLL: problem:
问题描述
我有这种情况:
程序A,它向mysql客户端发送一个sql查询,该客户端依次(在更新表T事件上)触发dll B中用户定义的函数,后者会更新变量v.
程序A然后使用同一个dll B的另一个函数来读取变量v.
按照您在文章如何在DLL中共享数据段"中所述的技术,在共享数据段中声明变量v.
我在dll中实现了函数来设置和获取v的值.
我的工作是在通过远程查询更新表T时实现程序A变量v的自动更新.
碰巧,由于没有共享v,所以mysql客户端对v的修改不会在程序A中反映出来,反之亦然.
但是,如果我使用程序A的两个(或多个)实例或mysql客户端的两个(或多个)实例而不是程序A和mysql客户端执行测试,则一切正常.
请帮忙.
D.Iracà
意大利比萨
电子邮件地址已删除
I have this situation:
program A which sends a sql query to a mysql client which in turns triggers (on update table T event) a user defined function in a dll B which updates a variable v.
program A then uses another function of the same dll B to read the variable v.
The variable v is declared in a shared data segment following the tecnique you describe in the article "How to share a data segment in a DLL".
I implemented functions in the dll to set and get the value of v.
My effort is to implement automatic update of the program''s A variable v when the table T is updated by a remote query.
It happens that the modification of v made by the mysql client don''t reflect themselves in program A and viceversa, as v was not shared.
But the things work fine if I perform a test with two (or more) instances of program A or two (or more) instances of the mysql client, instead of program A and mysql client.
Please help.
D.Iracà
Pisa Italy
Email address removed
推荐答案
您是否看到过此帖子[
Have you seen this post [^] in the article''s thread?
:)
这篇关于如何在DLL中共享数据段:问题:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!