COM Singleton and terminal server

Anshul Mittal 201 Reputation points
2021-03-22T06:53:18.07+00:00

I have a COM Singleton exe which always runs as administrator. It is responsible to start other COM servers for each user based on which user requests to start the COM server. (eg. If user 1 requests COM singleton to start COM server then the COM server is started as user 1(in task manager)). This works absolutely fine in remote desktop services. But in terminal server this functionality breaks.

In terminal server if user 1 requests to start COM server then COM server is started as User 1. After user 1 if any other user requests to start COM server it gets started as user 1 instead of the user requesting to start com server.

This is a critical issue and any help is appreciated.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,386 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,481 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Guido Franzke 2,196 Reputation points
    2021-03-22T10:46:16.33+00:00
    1 person found this answer helpful.
    0 comments No comments

  2. Anshul Mittal 201 Reputation points
    2021-03-25T11:20:39.43+00:00

    I have narrowed down my question even more. The issue is that the COM server exe1 is singleton which initiates another COM server exe2. It is not able to detect interactive user correctly. Example if User2 is requesting exe1 to initiate exe2 the interactive user should be User2 and exe2 should be initiated as User2, but it is being initiated as User1 because exe1 identified interactive user incorrectly.

    1 person found this answer helpful.
    0 comments No comments