Windows 8 named pipe creation

How can I create a named pipe in Windows 8 with an AppContainer integrity level?

+5
source share
2 answers

As Pavel Minaev noted in one of the comments to the answer , there are no named pipes in WinRT (for Metro applications, the applications for desktop applications are the same as in Windows 7):

Named pipes do not exist, for example, and memory mapped files. There are sockets (including server sockets), but when connecting to localhost, you can only connect to the same application.

You might be interested in the WinRT API , including sockets .

+4
source

Speaking of WinRT, you really cannot create a named pipe.

Speaking of a Windows 8 desktop application running under the AppContainer integrity level, you can create a named pipe using the usual WinAPI functions. The problem is by default, only applications with the same AppContainer ID can access it (in other words, only instances of your own application). But in fact, if you have a process with a high or medium integrity level - from this process you can create a channel and lower its integrity level, therefore applications from AppContainer can use it.

Take a look at the sample here: http://msdn.microsoft.com/en-us/library/windows/desktop/hh448493(v=vs.85).aspx

Moreover - from a desktop application with a high level of integrity, you can use dll injection to inject the DLL into the WinRT application and again - use WinAPI to create the channels. Thus, in WinRT it is forbidden to use not in the OS design, but only because of the lack of interfaces in WinRT.

+2
source

Source: https://habr.com/ru/post/954513/


All Articles