|
-
Nov 21st, 2000, 03:32 PM
#1
Thread Starter
Frenzied Member
Hi,
I am currently making a server system which is 5 servers (web, mail etc) all in one app, yet if one server crashes then they all do which is, quite frankly, very poor. So, how can i make my applications talk to each other (they are on the same pc) ?, is it possible (i think so) to set the text in a textbox of another application (i could do it this way ?)
Any Ideas ? Any help ?
Many thanks.
-
Nov 21st, 2000, 05:10 PM
#2
Fanatic Member
..
Hi,
Here is an *OLD* sample that i have.
Creating Microsoft® Visual Basic Application w/ DDE Links
How do you communicate with another VB application using DDE links ? The following example demonstrates the simple process:
SOURCE PROGRAM
1. Create a new application called "SAMPLESR"
2. Set the form link mode to "Source".
3. Set the form Name to something like "FormSource".
4. Set the form link topic to same as above "FormSource".
5. Place your link objects on the form, such as the text box.
6. Compile the program with the same application name.
DESTINATION PROGRAM
1. Create a new application called "DESTPROG".
2. Place a text box on the form.
3. Set the text box link topic to the source program and its linktopic name, example "SAMPLE|ORMSOURCE". <- Same as above !
4. Set the text box link Item to "Text1" because thats the text box you want to read from on the source application.
5. Place a command button or something to execute a "ext1.LinkMode = 1". This causes the destination application to contact the source application a begin the DDE link.
' DESTPROG
Private Sub Command1_Click()
Text1.LinkMode = 1
End Sub
' SAMPLESR
Private Sub Text1_LinkOpen(Cancel As Integer)
Text1.LinkMode = 1
End Sub
Private Sub Timer1_Timer()
Randomize 0
Text1 = Int(Rnd(1) * 99999) ' or what ever
End Sub
Regards
__________________
-
Nov 21st, 2000, 05:20 PM
#3
Thread Starter
Frenzied Member
Thank you very much for the reply, i will try that!
-
Nov 21st, 2000, 05:23 PM
#4
Hyperactive Member
Please do not use DDE!
Some of us have been trying to forget they ever came up with that. Please never speak of it again.
(seriously, it is prolly the slowest form of inter-process communication since a really slow thing did something really slowly, and it's flakey as f*!$)
Lets talk about your servers. Two possibles choices are COM or RPC/Winsock Messages. By far the quickest (unless you have a decent RPC rig set up) would be COM. What is it you each Svr has to do, what/why/when do they need to communicate with each other. What kind of controller do you want for the five, etc, etc.
If you want to discuss COM, fancy taking this over to the shiny new COM and aX forum ;-)
td.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Nov 22nd, 2000, 01:51 PM
#5
Thread Starter
Frenzied Member
More about my app
In total there is 6 apps, the main app, we call this aManager for application manager, then there are the 5 server apps. What i want is when the server app (any starts), i can code this into all of the apps, they send data to aManager telling the app that that certain server is online. Then when the app closes it tells it that the server has closed. Also every second the aManager will send a ping to each server and the server will respond to let the aManager know that the server is still online and other ino about it, also to know if its stopped running/crashed etc. I can probably do this using winsock ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|