Windows 8 named pipe creation
Asked Answered
F

2

5

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

Frizette answered 9/10, 2011 at 21:26 Comment(1)
I think you're looking for #18982721Cirrate
W
4

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.

Wivinah answered 10/10, 2011 at 6:42 Comment(3)
If sockets fit your needs, it is necessary to add the "Internet (Client & Server)" capability in Package.appxmanifest file. Double-click it and go the Declarations tab.Wivinah
That's really not an answer, because question was about "Windows 8 with AppContainer" and answer is about "WinRT". It is possible to have desktop application in AppContainer integrity level, and named pipes are available for desktop applications in Win8. Unfortunately, I don't know how to create pipe, available to both High-integrity application and "AppContainer" app - I got "access denied", so the question is still open.Hyrax
@Hyrax thanks for a valid and argumented downvote. Please provide your own answer if you will find more information on this.Wivinah
H
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.

Hyrax answered 12/8, 2014 at 12:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.