In C++, I've 2 services (say windows services) that are running on a system. Obviously both have their corresponding EXEs A.EXe & B.EXE.
If i want to query & receive some data between these 2 windows services can it be done as a function call by passing a pointer of a struct from 1 service & have the other service fill the struct using the pointer passed.
Common header file for both A & B:
struct Abc
{
int a;
}
Now say service A sends this struct object with its pointer or as pass by reference by calling a function in service B.EXE. Will this function call work across 2 services & can the data be transferred between A & B this way?
Or do i need an IPC mechanism like sockets.
Whats the best way for achieving the data transfer between 2 services running on same system
Aucun commentaire:
Enregistrer un commentaire