Windows 8 named pipe creation

别来无恙 提交于 2019-12-22 06:57:45

问题


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


回答1:


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

Named pipes aren't there, for example, nor are memory mapped files. There are sockets (including server sockets), but when connecting to localhost, you can only connect to the same app.

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




回答2:


Talking about WinRT - you really can't create named pipe.

Talking about Windows 8 desktop application running under AppContainer integrity level - you can create named pipe by regular WinAPI functions. The problem is by default only applications with same AppContainer ID could access it (in other words - only instances of your own application). But in fact if you have process under High or Medium integrity level - from this process you can create pipe and decrease its integrity level, so applications from AppContainer can use it.

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

Even more - from desktop application with High integrity level you can use dll injection to inject you dll to WinRT application and again - use WinAPI to create pipes. So pipes are denied in WinRT not by OS design, but only by lack of interfaces in WinRT.



来源:https://stackoverflow.com/questions/7706660/windows-8-named-pipe-creation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!