Creating a Cross-Process EventWaitHandle

前端 未结 2 1257
日久生厌
日久生厌 2020-12-08 04:56

I have two windows application, one is a windows service which create EventWaitHandle and wait for it. Second application is a windows gui which open it by calling EventWait

2条回答
  •  春和景丽
    2020-12-08 05:36

    This might be caused by the service process running at an elevated privilege level, but the GUI process is not. If you put the same code into two console apps, they'll both be running at user level and won't have any trouble accessing each other's named shared objects.

    Try running the GUI app with the "Run as administrator" flag from the Windows start menu. If that solves the issue, you need to read up on how to request elevation within your code. (I haven't done that)

提交回复
热议问题