[PATCH] kernelbase: Implement AppPolicyGetMediaFoundationCodecLoading.

Nikolay Sivov nsivov at codeweavers.com
Wed Nov 10 06:24:41 CST 2021



On 11/9/21 4:57 AM, Mohamad Al-Jaf wrote:
> Enables native Windows 10 media foundation libraries to run.
>
> Signed-off-by: Mohamad Al-Jaf <mohamadaljaf at gmail.com>
> ---
>  .../api-ms-win-appmodel-runtime-l1-1-2.spec        |  2 +-
>  dlls/kernelbase/kernelbase.spec                    |  2 +-
>  dlls/kernelbase/main.c                             | 14 ++++++++++++++
>  include/appmodel.h                                 |  6 ++++++
>  4 files changed, 22 insertions(+), 2 deletions(-)

Apparently kernel32 also has AppPolicy exports, please add a forward
there too.

> diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c
> index b90ee1cba2c..e6cf892a4dc 100644
> --- a/dlls/kernelbase/main.c
> +++ b/dlls/kernelbase/main.c
> @@ -88,6 +88,20 @@ INT WINAPI MulDiv( INT a, INT b, INT c )
>      return ret;
>  }
>  
> +/***********************************************************************
> + *          AppPolicyGetMediaFoundationCodecLoading (KERNELBASE.@)
> + */
> +
> +LONG WINAPI AppPolicyGetMediaFoundationCodecLoading(HANDLE token, AppPolicyMediaFoundationCodecLoading *policy)
> +{
> +    FIXME("%p, %p\n", token, policy);
> +
> +    if(policy)
> +        *policy = AppPolicyMediaFoundationCodecLoading_All;
> +
> +    return ERROR_SUCCESS;
> +}

Thanks, this seems to match what unpackaged binary gets according to my
quick test, so that's good.

> +
>  /***********************************************************************
>   *          AppPolicyGetProcessTerminationMethod (KERNELBASE.@)
>   */
> diff --git a/include/appmodel.h b/include/appmodel.h
> index e4288bbfbb0..cf1b9659d14 100644
> --- a/include/appmodel.h
> +++ b/include/appmodel.h
> @@ -22,6 +22,12 @@
>  extern "C" {
>  #endif
>  
> +typedef enum AppPolicyMediaFoundationCodecLoading
> +{
> +    AppPolicyMediaFoundationCodecLoading_All       = 0,
> +    AppPolicyMediaFoundationCodecLoading_InboxOnly = 1,
> +} AppPolicyMediaFoundationCodecLoading;
> +
>  typedef enum AppPolicyProcessTerminationMethod
>  {
>      AppPolicyProcessTerminationMethod_ExitProcess      = 0,
Please add function prototype as well.



More information about the wine-devel mailing list