forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Sharing Data between Applications

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Wed Mar 10, 2004 8:50 am    Post subject: Sharing Data between Applications Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Mar 10, 2004 9:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Mar 10, 2004 10:09 am    Post subject: Reply with quote

Skit, I think those addresses are prolly relative to each app's
location in memory, and not global... Confused

I have not used this much, but how about DDE?

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Wed Mar 10, 2004 10:11 am    Post subject: Reply with quote

Hi,

adjust seems not to return the value of a variable. Only the memory adress adjusted.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Wed Mar 10, 2004 10:17 am    Post subject: Reply with quote

Hi,

DDE has some problems I reported in some threads before: here
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Mar 10, 2004 10:33 am    Post subject: Reply with quote

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
Arrow 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
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Mar 10, 2004 10:34 am    Post subject: Reply with quote

I checked your link Fabian, and see you found that "the problem
only happens, when you use the WAIT parameter for the RUN
command"
. Wink

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. Confused

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. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Thu Mar 11, 2004 7:54 am    Post subject: Reply with quote

thanks for your help. I will play a little bit with DDE again Laughing
Back to top
View user's profile Send private message Send e-mail Visit poster's website
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Thu Mar 11, 2004 11:26 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Fri Mar 12, 2004 9:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Mon Mar 15, 2004 6:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Mon Mar 15, 2004 9:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Tue Mar 16, 2004 12:47 pm    Post subject: Reply with quote

Oh, that's a great solution :=
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Tue Mar 16, 2004 1:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Tue Mar 16, 2004 2:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group