| View previous topic :: View next topic |
| Author |
Message |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Dec 22, 2003 10:56 am Post subject: Sharing Variables to multiple vds apps |
|
|
Hi,
I have a problem sharing variable over multiple vds applications in my Intranet/CRM program.
At this time I use Prakash's vdsmem.dll but it seems to have a limitiation to some bytes of data in the memory. I have made some tests and found out that getting data from the memorymap crashes after some bytes are in the memory (the number of variables I can set varies on the lenght of data in each variable).
I testet the gateway.dll today - it has exactly the same limitation.
Is there another way to do this ? I need an event to be fired in vds when another app writes into a variable (like memorymapchanged / gatewaychanged in this dlls).
Thanks for your help.
Bye, Fabian |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Mon Dec 22, 2003 4:04 pm Post subject: |
|
|
What about using a timer to look into an INI file or a place in the registry? You can have one app save to the ini/registry and another check every ?? seconds. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Dec 22, 2003 4:39 pm Post subject: |
|
|
I think it's not fast enough - does a timer fireing every second need much memory / cpu load ?
bye, fabian |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Dec 22, 2003 7:50 pm Post subject: |
|
|
You might try something that I've been working on here for a while
now. I was working on an example for everyone, but it's not ready
so I'll just explain what I do. It's rather simple really.
I call it "Simple Application Communication Xchange (SACX)", and
what you do is add a 0,0,0,0 BUTTON to each program you want to
communicate with, or with each other. One program can act as the
main server app, and basically, it needs to set things up for all the
other apps. It starts off by writting to a file somewhere what it's
id is for it's own button. Then all other apps look for that file to get
the id. Once all apps have the id, then the file is no longer needed.
(You could try this with other elements also I guess, but make sure
the elements have a CLICK style to allow events to be fired off.)
Each app reports in with the id of it's own button, and the main app
keeps control of the list.
Now, if one app needs to send/share info with another, what you do
is set the dlgtext of the button of the app you want to send the info
to, then send a click or @cr() to that button which sets off the event
for that button. In that buttons branch, you check the dlgtext of the
button to get the information.
What I was setting up here in my example though, was some flags
or switches to preceed the information which tells the app what kind
of information is being sent. There's a little macro language basically
that I was making for it to control all the apps in a SACX. So you
could tell all app in a local SACX to minimize, restore, close or
whatever.
The only drawback to this method is that all the apps in this group
have to be hard coded the name and location of the initial setup file
that gives out the id of the main app. But at least you don't have
to keep writing to a file and running loops checking the sucker. At
least with this, an event is fired off.
And if you don't want the buttons to be in the Tab order, then set it
all up to disable and enable the buttons prior to sending information
to the buttons. Enable a button that is about to receive some info,
fire the event, and then disable the button.
Not sure the above will really help you in what you need, but it's the
only other idea that I can offer that's not ini file or dll based.
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Dec 23, 2003 7:02 am Post subject: |
|
|
Hi Garrett,
thanks for your answer. Nice idea
I will try it with some test scripts.
Bye, Fabian |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Wed Dec 24, 2003 2:49 am Post subject: |
|
|
Here's a link to what I was toying with before. You might consider
different angles on this as my code was not working 100% when I
last left off on this code.
http://garrett.vdsworld.com/misc/sacx.zip
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
|