I have a Windows Service that is exposing some COM functions to be invoked via IDispatch Invoke. There are different clients (Windows applications) that at any moment can Invoke any of these functions. I need to introduce a change in the Windows Service that does not require any change in the clients (I cannot modify them). I need to differentiate (like an ID) which application is Invoking a function. NOTE: I do not need to know the exact client application, just to distinct between the different clients in the current session is enough.
For example: Let's say there are two clients C1 and C2. When C1 Invokes function F1 in the Windows Service (WS), WS knows that every time that (during the current session) a client X1 (note I said X1, because WS does not need to know exactly that C1 Invoked F1, just to assign an ID to C1 like a PID~process ID~). So, now C3 Invokes F2, WS knows that a client X2 (which is different that X1) invoked F2. And, then again C1 Invokes FX (any COM function exposed by WS) WS can distinct that X1 invoked FX, instead that a client Xn (like X2) Invoked FX.
Is there anything that can help me to achieve this situation without the need of an ID argument from the clients?