Autor Beitrag
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Di 05.10.04 13:25 
Hi!

Wie kann ich denn zwischen zwei Prozessen kommunizieren ohne auf "Netzwerkkomponenten" (also nicht über TCP/IUP oder Udp etc.) und Windows-Messaging (geht in meinem Fall leider nich) zurückzugreifen? Ich hätte noch die Idee, es über Dateien zu machen (also ein Prozess schreibt die Daten für den anderen in ne Datei. Der andere pollt die Datei immer wieder bis etwas neues drin steht), aber 1. is das wahrscheinlich net wirklich schnell, verballert Systemressourcen und außerdem is das ne unsaubere Lösung...




THX,

MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
MasterT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67

Win XP x64, Win 98, Win 2000, Win ME
D6 Prof., Delphi 2006
BeitragVerfasst: Di 05.10.04 13:56 
Um was für Daten handelt es sich denn?

Gruß

MasterT
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Di 05.10.04 14:00 
Und soll das übers Netzwerk gehen?

_________________
JSXGraph
MrSaint Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Di 05.10.04 14:03 
Den genauen Umfang habe ich noch nicht festgelegt (das Projekt steht noch am Anfang), aber im Moment rechne ich damit, dass Statusmeldungen und Schlüssel zur Ver-/Entschlüsselung ausgetauscht werden müssen. Vielleicht sollte ich dazusagen, dass ein Ende der Kommunikation in einer DLL liegt und das andere in einem Dienst liegen wird (also Kommunikation DLL <-> Dienst). Später kommt dann auch noch Dienst <-> normales Programm dran...



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
MrSaint Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Di 05.10.04 14:05 
raziel hat folgendes geschrieben:
Und soll das übers Netzwerk gehen?

MrSaint hat folgendes geschrieben:
Wie kann ich denn zwischen zwei Prozessen kommunizieren ohne auf "Netzwerkkomponenten" (also nicht über TCP/IUP oder Udp etc.)


Also nur zwischen zwei Prozessen auf einem Rechner!



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Di 05.10.04 14:08 
Nun, der "normale" Weg wäre in Memory Mapped Files die Daten zu speichern und den anderen Prozess per Windows Message zu informieren. Wenn Du aber nicht auf Messages zurückgreifen kannst/willst, dann bleibt dir (imho) nichts anderes übrig als zu pollen.

_________________
JSXGraph
MrSaint Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Di 05.10.04 14:13 
hmm... das is blöd... Ich les grad in der MSDN:

MSDN hat folgendes geschrieben:
COM is designed to allow clients to communicate transparently with objects, regardless of where those objects are running—in the same process, on the same machine, or on a different machine. This provides a single programming model for all types of objects, and for both object clients and object servers.


Per Zufall hab ich mir gestern ein COM-Buch für Delphi ersteigert... Müsste also demnächst kommen... Kann ich das dann damit realisieren (und kann somit jetzt mal warten bis das Buch da is), oder muss ich mich noch nach was anderem umschauen? weil das mit dem pollen gefällt mir halt überhaupt net....



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Di 05.10.04 14:30 
Schau dir das hier an! Für welche Variante du dich entscheidest, bleibt dir überlassen. ;-)

Gruß,
Jörg

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
MrSaint Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Di 05.10.04 14:35 
.Chef hat folgendes geschrieben:
Schau dir das hier an! Für welche Variante du dich entscheidest, bleibt dir überlassen. ;-)


Hmm... danke, aber da sind wieder Windows-Messages dabei :( Kann ich net benutzen :(




MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Di 05.10.04 14:42 
Du kannst ja den Message-Teil weglassen und stattdessen pollen...

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Di 05.10.04 14:42 
COM ist auf jeden Fall eine Möglichkeit..! Als Alternative würden mir sonst noch Pipes einfallen...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
MrSaint Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Di 05.10.04 14:58 
Motzi hat folgendes geschrieben:
Als Alternative würden mir sonst noch Pipes einfallen...


Hmm... hab das mal schnell in der MSDN überflogen. Also anonymous Pipes da würds wahrscheinlich wieder auf pollen rauslaufen (vorausgesetzt ich würds schaffen, das handle in den anderen Prozess zu bekommen), das wär dann halt nicht HDD-Pollen sondern Speicher-Pollen, aber immer noch pollen. Die Named Pipes hab ich mir net weiter angeschaut, weil man die anscheinend unter Win95/98/ME nicht erzeugen kann.

Motzi hat folgendes geschrieben:
COM ist auf jeden Fall eine Möglichkeit..!

Das klingt doch mal positiv, dann wart ich jetzt mal auf das COM-Buch :)


Danke!



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Di 05.10.04 19:01 
Sonst fallen mir noch Suche im MSDN MAILSLOTS ein...

Aber COM ist wahrscheinlich eh die bessere Wahl.. ist halt auch komplexer..!

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!