winapi_ui_automation/um/
namespaceapi.rs

1// Licensed under the Apache License, Version 2.0
2// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4// All files in the project carrying such notice may not be copied, modified, or distributed
5// except according to those terms
6use shared::minwindef::{BOOL, LPVOID, ULONG};
7use shared::ntdef::{BOOLEAN, HANDLE, LPCWSTR};
8use um::minwinbase::LPSECURITY_ATTRIBUTES;
9use um::winnt::PSID;
10pub const PRIVATE_NAMESPACE_FLAG_DESTROY: ULONG = 0x00000001;
11extern "system" {
12    pub fn CreatePrivateNamespaceW(
13        lpPrivateNamespaceAttributes: LPSECURITY_ATTRIBUTES,
14        lpBoundaryDescriptor: LPVOID,
15        lpAliasPrefix: LPCWSTR,
16    ) -> HANDLE;
17    pub fn OpenPrivateNamespaceW(
18        lpBoundaryDescriptor: LPVOID,
19        lpAliasPrefix: LPCWSTR,
20    ) -> HANDLE;
21    pub fn ClosePrivateNamespace(
22        Handle: HANDLE,
23        Flags: ULONG,
24    ) -> BOOLEAN;
25    pub fn CreateBoundaryDescriptorW(
26        Name: LPCWSTR,
27        Flags: ULONG,
28    ) -> HANDLE;
29    pub fn AddSIDToBoundaryDescriptor(
30        BoundaryDescriptor: *mut HANDLE,
31        RequiredSid: PSID,
32    ) -> BOOL;
33    pub fn DeleteBoundaryDescriptor(
34        BoundaryDescriptor: HANDLE,
35    ) -> ();
36}