sharing values between multiple apps using dll

I have a C++ DLL which i want to send from one program to multiple programs requesting for values using a char as their identifier.

This DLL Code share double values between two running app, but whenever i add another program to it, it either return same double values to the old and new app or just jargons mixing, now i want the identifier to be a string or char, but being new to C++ i don’t know which way to go..

Code:

mt4 void __stdcall send(double a, double b)//This is called by sender
{

    receive_ask=a; //Receiver request for this double value
    receive_bid=b;//And this second double value using the values down 5&6 lines
    return;
}


mt4 double __stdcall get_terminal_1_bid() {return receive_bid;}
mt4 double __stdcall get_terminal_1_ask() {return receive_ask;}

I would want to make the send(a,b); function send the double values in array and i would want the receiver to also receive their values independently…

The receiver would identify each of their value using a string as identifier…

Please, pardon my noob question as i am new to C++


Source: dll

Leave a Reply