Hi Alistair,<div><br></div><div>I will split this patch - by sending the header file first.</div><div>You can send in the rest along with the tests.</div><div>But here in this patch we are not changing the apisetmap.</div><div><br></div><div>Thanks,</div><div>Vijay<br><br>On Thursday, May 2, 2019, Alistair Leslie-Hughes <<a href="mailto:leslie_alistair@hotmail.com">leslie_alistair@hotmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Vijay,<br>
<br>
The main reason I haven't pushed this commit is that it should have some <br>
tests.<br>
<br>
I was thinking of using ApiSetQueryApiSetPresence to test the ApiSet change.<br>
<br>
<br>
Regards<br>
<br>
Alistair.<br>
<br>
<br>
On 2/5/19 11:01 am, Vijay Kiran Kamuju wrote:<br>
> From: Michael Müller <<a href="mailto:michael@fds-team.de">michael@fds-team.de</a>><br>
><br>
> Wine-Bug: <a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.winehq.org%2Fshow_bug.cgi%3Fid%3D44658&data=02%7C01%7C%7C90603468a8eb46f474bb08d6ce99d459%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636923557419910653&sdata=Swmos5%2Bd8WXSKhfNasBGuDhNd0Nujv1Vdw0tOUM0U7Y%3D&reserved=0" target="_blank">https://nam02.safelinks.<wbr>protection.outlook.com/?url=<wbr>https%3A%2F%2Fbugs.winehq.org%<wbr>2Fshow_bug.cgi%3Fid%3D44658&<wbr>data=02%7C01%7C%<wbr>7C90603468a8eb46f474bb08d6ce99<wbr>d459%<wbr>7C84df9e7fe9f640afb435aaaaaaaa<wbr>aaaa%7C1%7C0%<wbr>7C636923557419910653&sdata=<wbr>Swmos5%<wbr>2Bd8WXSKhfNasBGuDhNd0Nujv1Vdw0<wbr>tOUM0U7Y%3D&reserved=0</a><br>
> From: Michael Müller <<a href="mailto:michael@fds-team.de">michael@fds-team.de</a>><br>
> Signed-off-by: Vijay Kiran Kamuju <<a href="mailto:infyquest@gmail.com">infyquest@gmail.com</a>><br>
> ---<br>
>   dlls/ntdll/thread.c |  2 ++<br>
>   include/Makefile.in |  1 +<br>
>   include/apiset.h    | 37 ++++++++++++++++++++++++++++++<wbr>+++++++<br>
>   include/winternl.h  |  3 ++-<br>
>   4 files changed, 42 insertions(+), 1 deletion(-)<br>
>   create mode 100644 include/apiset.h<br>
><br>
> diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c<br>
> index be4621819bc..d687043f51b 100644<br>
> --- a/dlls/ntdll/thread.c<br>
> +++ b/dlls/ntdll/thread.c<br>
> @@ -70,6 +70,7 @@ static PEB_LDR_DATA ldr;<br>
>   static RTL_BITMAP tls_bitmap;<br>
>   static RTL_BITMAP tls_expansion_bitmap;<br>
>   static RTL_BITMAP fls_bitmap;<br>
> +static API_SET_NAMESPACE_ARRAY apiset_map;<br>
>   static int nb_threads = 1;<br>
>   <br>
>   static RTL_CRITICAL_SECTION peb_lock;<br>
> @@ -189,6 +190,7 @@ void thread_init(void)<br>
>       peb = addr;<br>
>   <br>
>       peb->FastPebLock        = &peb_lock;<br>
> +    peb->ApiSetMap          = &apiset_map;<br>
>       peb->TlsBitmap          = &tls_bitmap;<br>
>       peb->TlsExpansionBitmap = &tls_expansion_bitmap;<br>
>       peb->FlsBitmap          = &fls_bitmap;<br>
> diff --git a/include/Makefile.in b/include/Makefile.in<br>
> index 6c8d39ab76b..6ec4c51f18e 100644<br>
> --- a/include/Makefile.in<br>
> +++ b/include/Makefile.in<br>
> @@ -14,6 +14,7 @@ SOURCES = \<br>
>       amsi.idl \<br>
>       amstream.idl \<br>
>       amvideo.idl \<br>
> +     apiset.h \<br>
>       appcompatapi.h \<br>
>       appmgmt.h \<br>
>       appmodel.h \<br>
> diff --git a/include/apiset.h b/include/apiset.h<br>
> new file mode 100644<br>
> index 00000000000..6801cd5f509<br>
> --- /dev/null<br>
> +++ b/include/apiset.h<br>
> @@ -0,0 +1,37 @@<br>
> +/*<br>
> + * Copyright (C) 2017 Michael Müller<br>
> + *<br>
> + * This library is free software; you can redistribute it and/or<br>
> + * modify it under the terms of the GNU Lesser General Public<br>
> + * License as published by the Free Software Foundation; either<br>
> + * version 2.1 of the License, or (at your option) any later version.<br>
> + *<br>
> + * This library is distributed in the hope that it will be useful,<br>
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br>
> + * Lesser General Public License for more details.<br>
> + *<br>
> + * You should have received a copy of the GNU Lesser General Public<br>
> + * License along with this library; if not, write to the Free Software<br>
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA<br>
> + */<br>
> +#ifndef _API_SET_H_<br>
> +#define _API_SET_H_<br>
> +<br>
> +#include <windef.h><br>
> +<br>
> +typedef struct _API_SET_NAMESPACE_ENTRY<br>
> +{<br>
> +    ULONG NameOffset;<br>
> +    ULONG NameLength;<br>
> +    ULONG DataOffset;<br>
> +} API_SET_NAMESPACE_ENTRY, *PAPI_SET_NAMESPACE_ENTRY;<br>
> +<br>
> +typedef struct _API_SET_NAMESPACE_ARRAY<br>
> +{<br>
> +    ULONG Version;<br>
> +    ULONG Count;<br>
> +    API_SET_NAMESPACE_ENTRY Array[1];<br>
> +} API_SET_NAMESPACE_ARRAY, *PAPI_SET_NAMESPACE_ARRAY;<br>
> +<br>
> +#endif<br>
> diff --git a/include/winternl.h b/include/winternl.h<br>
> index 2b3fb947b9b..1832f49994c 100644<br>
> --- a/include/winternl.h<br>
> +++ b/include/winternl.h<br>
> @@ -23,6 +23,7 @@<br>
>   <br>
>   #include <ntdef.h><br>
>   #include <windef.h><br>
> +#include <apiset.h><br>
>   <br>
>   #ifdef __cplusplus<br>
>   extern "C" {<br>
> @@ -286,7 +287,7 @@ typedef struct _PEB<br>
>       ULONG                        EnvironmentUpdateCount;            /* 028/050 */<br>
>       PVOID                        KernelCallbackTable;               /* 02c/058 */<br>
>       ULONG                        Reserved[2];                       /* 030/060 */<br>
> -    PVOID /*PPEB_FREE_BLOCK*/    FreeList;                          /* 038/068 */<br>
> +    PAPI_SET_NAMESPACE_ARRAY     ApiSetMap;                         /* 038/068 */<br>
>       ULONG                        TlsExpansionCounter;               /* 03c/070 */<br>
>       PRTL_BITMAP                  TlsBitmap;                         /* 040/078 */<br>
>       ULONG                        TlsBitmapBits[2];                  /* 044/080 */<br>
</blockquote></div>