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

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Wed Mar 10, 2004 8:50 am Post subject: Sharing Data between Applications |
|
|
Hi,
I am looking for a new way to share data between applications.
At the moment I use vdsmem.dll, but it has a bug if too many data is written into the memory. I reduced the data but on some systems with low physical ram the dll crashes with error 27 when I try to receive data from the memorymap.
I need data sharing and notification on data change (like the memorymapchanged event). Reading from registry or inifile at specific times it to unsecure for me (data manipulation by the user).
Thanks for your help.
Bye, Fabian |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Mar 10, 2004 9:57 am Post subject: |
|
|
Maybe it's possible to do such a thing?
Server:
| Code: | %a = "Just a test message"
info Memory address: @addr("%a")
wait 10 |
Client:
| Code: | | info Variable value: @adjust(@input(Enter the memory address.)) |
I haven't tested it, and I'm not sure of the @adjust function used in the client script... _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Mar 10, 2004 10:09 am Post subject: |
|
|
Skit, I think those addresses are prolly relative to each app's
location in memory, and not global...
I have not used this much, but how about DDE?
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361

Last edited by Mac on Wed Mar 10, 2004 10:11 am; edited 1 time in total |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Wed Mar 10, 2004 10:11 am Post subject: |
|
|
Hi,
adjust seems not to return the value of a variable. Only the memory adress adjusted. |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Wed Mar 10, 2004 10:17 am Post subject: |
|
|
Hi,
DDE has some problems I reported in some threads before: here |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Wed Mar 10, 2004 10:33 am Post subject: |
|
|
Yeah skit those (@ADDR() ) are local to the app.
I think since winows 98 data sharing between the apps has become more the feild of COM and as of now there is no access to such a interface in VDS. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension
Last edited by CodeScript on Wed Mar 10, 2004 10:45 am; edited 1 time in total |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Mar 10, 2004 10:34 am Post subject: |
|
|
I checked your link Fabian, and see you found that "the problem
only happens, when you use the WAIT parameter for the RUN
command".
I would guess the problem is that "WAIT" halts the script until
the run command is finished, and this halting interferes with
the still active DDE communication. So DDE may not be at
fault on that, but I'm not sure.
Instead of using "WAIT", you might run a loop after the "RUN"
command to check that "RUN" has finished (the app has closed).
Just a thought.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Thu Mar 11, 2004 7:54 am Post subject: |
|
|
thanks for your help. I will play a little bit with DDE again  |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Thu Mar 11, 2004 11:26 am Post subject: |
|
|
| is there a way to prevent the dde link command from starting the dde server app ? My intranet application has several exe files in different folders, but the main apps are in the same folder. all "child apps" shall communicate with the main app. So if dde starts the main app each time if will have much instances of the main app. |
|
| Back to top |
|
 |
Protected Valued Contributor


Joined: 02 Jan 2001 Posts: 228 Location: Portugal
|
Posted: Fri Mar 12, 2004 9:46 am Post subject: |
|
|
Perhaps if you close them before the dialog shows? := Or you mean you want the link to be sent to the already open window?
If that's the case, maybe it would be possible to make the server application check if another instance is already open using class names, and, if so, it would pass the information to it and close itself (before dialog creation). |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Mar 15, 2004 6:14 pm Post subject: |
|
|
I think the vds5 dde functionality is not good enough for this. Sometimes the "child" starts the dde server exe again - also if it is already started. But sometimes not. I don't know why.
I like prakash's vdsdde.dll because I can disallow dde poke there, but it has no "client" functionality.
I found a problem - the client app hangs sometimes on linking to the mainapp like already described in another thread on this board. |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Mon Mar 15, 2004 9:20 pm Post subject: |
|
|
How about using TCP (tcp/ip - internet) on the local computer. Set up one application to be the TCP server, all other app's are the TCP clients. This is simply just using the protocol on the local computer, no internet access is required.
This allows you fast reliable communication with unlimited amounts of data being passed back and forth.
Connection would use > LOCALHOST as the server/host name and the PORT number specified in the script.
You can prevent remote computers from connecting by simply checking client IP connections and check to see if they do not match the localhost ip address, if so deny actions and also remove the user from the client pool. |
|
| Back to top |
|
 |
Protected Valued Contributor


Joined: 02 Jan 2001 Posts: 228 Location: Portugal
|
Posted: Tue Mar 16, 2004 12:47 pm Post subject: |
|
|
| Oh, that's a great solution := |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Mar 16, 2004 1:09 pm Post subject: |
|
|
Hi Prakash,
I already thought about this.
I need more than 10 sub-applications to talk with each other (bidirectional) - so I would have to open too much ports and send notifications to each app.
With memorymap all apps get knowledge.
Maybe gadget.dll can do something like memorymap. I already asked Johnny.
Bye, Fabian |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Tue Mar 16, 2004 2:53 pm Post subject: |
|
|
That's not entirely true.
With TCP you open one port. For instance >>
The TCP Server opens port 352
All TCP Clients also open port 352 to talk to the server.
Now when the server needs to talk to all users it can either send each a notification, (with vdsipp you can use TCP-SERVER SENDALL to instantly send a message to all connected clients).
It's really not as hard as it sounds and is much more reliable then writing/reading memory streams. |
|
| Back to top |
|
 |
|