Required by IE11.
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- include/Makefile.in | 1 + include/namespaceapi.h | 43 ++++++++++++++++++++++++++++++++++++++++++ include/winbase.h | 2 ++ 3 files changed, 46 insertions(+) create mode 100644 include/namespaceapi.h
diff --git a/include/Makefile.in b/include/Makefile.in index de40421edcb..302e0bb2a73 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -526,6 +526,7 @@ SOURCES = \ mtxdm.h \ mulres.idl \ multimon.h \ + namespaceapi.h \ natupnp.idl \ nb30.h \ ncrypt.h \ diff --git a/include/namespaceapi.h b/include/namespaceapi.h new file mode 100644 index 00000000000..9447ee26a53 --- /dev/null +++ b/include/namespaceapi.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2021 Mohamad Al-Jaf + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _NAMESPACEAPI_H_ +#define _NAMESPACEAPI_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ClosePrivateNamespace flags */ +#define PRIVATE_NAMESPACE_FLAG_DESTROY 0x00000001 + +/* CreateBoundaryDescriptorW flags */ +#define CREATE_BOUNDARY_DESCRIPTOR_ADD_APPCONTAINER_SID 0x01 + +BOOL WINAPI AddSIDToBoundaryDescriptor(HANDLE*,PSID); +BOOLEAN WINAPI ClosePrivateNamespace(HANDLE,ULONG); +HANDLE WINAPI CreateBoundaryDescriptorW(LPCWSTR,ULONG); +HANDLE WINAPI CreatePrivateNamespaceW(LPSECURITY_ATTRIBUTES,LPVOID,LPCWSTR); +void WINAPI DeleteBoundaryDescriptor(HANDLE); +HANDLE WINAPI OpenPrivateNamespaceW(LPVOID,LPCWSTR); + +#ifdef __cplusplus +} +#endif + +#endif /* _NAMESPACEAPI_H_ */ \ No newline at end of file diff --git a/include/winbase.h b/include/winbase.h index 2f7287f12b6..0a0bfde9d10 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -241,6 +241,8 @@ typedef struct _SECURITY_ATTRIBUTES BOOL bInheritHandle; } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
+#include <namespaceapi.h> + #ifndef _FILETIME_ #define _FILETIME_ /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
Hi,
On 12/7/21 03:17, Mohamad Al-Jaf wrote:
+/* CreateBoundaryDescriptorW flags */ +#define CREATE_BOUNDARY_DESCRIPTOR_ADD_APPCONTAINER_SID 0x01
Looks like that this should be added to winnt.h instead?
Hi Jactry,
Looks like you're right, I just saw it in the Windows SDK winnt.h file, it's defined as:
#define CREATE_BOUNDARY_DESCRIPTOR_ADD_APPCONTAINER_SID 0x1
I'm not sure on which line to add it to, is it okay to add it on line 3750, before #define SID_REVISION?
How come they used the value 0x1? It's 0x01 on the Microsoft Docs site. As far as I know, they are the same value but differ in bit value and the compiler evaluates them to the same value. So for copyright purposes, would it be better to add or remove extra 0s? Should I do the same for PRIVATE_NAMESPACE_FLAG_DESTROY?
On Mon, Dec 6, 2021 at 10:56 PM Jactry Zeng jzeng@codeweavers.com wrote:
Hi,
On 12/7/21 03:17, Mohamad Al-Jaf wrote:
+/* CreateBoundaryDescriptorW flags */ +#define CREATE_BOUNDARY_DESCRIPTOR_ADD_APPCONTAINER_SID 0x01
Looks like that this should be added to winnt.h instead?
On 12/7/21 04:42, Mohamad Al-Jaf wrote:
I'm not sure on which line to add it to, is it okay to add it on line 3750, before #define SID_REVISION?
This looks fine to me.
How come they used the value 0x1? It's 0x01 on the Microsoft Docs site. As far as I know, they are the same value but differ in bit value and the compiler evaluates them to the same value. So for copyright purposes, would it be better to add or remove extra 0s? Should I do the same for PRIVATE_NAMESPACE_FLAG_DESTROY?
I don't see this really matters, I think you can just choose the one you'd prefer.
Thank you for the help and feedback. I have submitted a revision. :)
On Tue, Dec 7, 2021 at 1:20 AM Jactry Zeng jzeng@codeweavers.com wrote:
On 12/7/21 04:42, Mohamad Al-Jaf wrote:
I'm not sure on which line to add it to, is it okay to add it on line
3750,
before #define SID_REVISION?
This looks fine to me.
How come they used the value 0x1? It's 0x01 on the Microsoft Docs site.
As
far as I know, they are the same value but differ in bit value and the compiler evaluates them to the same value. So for copyright purposes,
would
it be better to add or remove extra 0s? Should I do the same for PRIVATE_NAMESPACE_FLAG_DESTROY?
I don't see this really matters, I think you can just choose the one you'd prefer.