<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <br>
    <br>
    <div class="moz-cite-prefix">On 11/11/21 9:05 AM, Mohamad Al-Jaf
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAB2hftLxdpXXf43Em8Z+4ztbb2txBLS64Uz_243+L-u09jHTKA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi Nikolay, 
        <div><br>
        </div>
        <div>Thanks for the feedback.
          <div><br>
          </div>
          <div>I'm not sure what you mean by forward, is it in the spec
            file? Or are you referring to forward declaration? Sorry,
            I'm new to wine development and have no idea, but I'm
            assuming you mean the spec file because I see stdcalls that
            are being forwarded to kernelbase.</div>
          <div><br>
          </div>
          <div>Regardless, I did not see any mention of AppPolicy in
            kernel32 so I added the existing AppPolicy functions as
            well. This is in kernel32.spec, is it correct? I don't want
            to submit a broken patch and waste the dev team's time.</div>
          <div><br>
          </div>
          <div>@ stdcall AppPolicyGetMediaFoundationCodecLoading(ptr
            ptr) kernelbase.AppPolicyGetMediaFoundationCodecLoading<br>
            @ stdcall AppPolicyGetProcessTerminationMethod(ptr ptr)
            kernelbase.AppPolicyGetProcessTerminationMethod<br>
            @ stdcall AppPolicyGetShowDeveloperDiagnostic(ptr ptr)
            kernelbase.AppPolicyGetShowDeveloperDiagnostic<br>
            @ stdcall AppPolicyGetThreadInitializationType(ptr ptr)
            kernelbase.AppPolicyGetThreadInitializationType<br>
            @ stdcall AppPolicyGetWindowingModel(ptr ptr)
            kernelbase.AppPolicyGetWindowingModel<br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Yes, that's how it's done. For your patch just add
    AppPolicyGetMediaFoundationCodecLoading for now.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAB2hftLxdpXXf43Em8Z+4ztbb2txBLS64Uz_243+L-u09jHTKA@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div><br>
            Great, so the code in kernelbase/main is correct? What do
            you mean by 'unpackaged binary'? How did you test it? I'm
            trying to learn as much as I can about wine development.</div>
        </div>
      </div>
    </blockquote>
    <br>
    Yes, it seems to work. I haven't checked if it does null argument
    validation, but it does return _All on windows. My unpackaged I mean
    regular standalone exe. As I understand all of AppPolicy* are meant
    for appx bundles, don't know how they are created or what's in
    there. But from some docs it must be binary packaged together with
    some metadata, with some signing I guess. With that metadata you can
    control what's allowed and what's not, and shared code then can use
    AppPolicy* to access this configuration.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAB2hftLxdpXXf43Em8Z+4ztbb2txBLS64Uz_243+L-u09jHTKA@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>I'll submit a revision for the function prototype, sorry
          about that.</div>
        <div><br>
        </div>
        <div>Kind regards,</div>
        <div>Mohamad</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Nov 10, 2021 at 7:24
          AM Nikolay Sivov <<a href="mailto:nsivov@codeweavers.com"
            moz-do-not-send="true">nsivov@codeweavers.com</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
          <br>
          On 11/9/21 4:57 AM, Mohamad Al-Jaf wrote:<br>
          > Enables native Windows 10 media foundation libraries to
          run.<br>
          ><br>
          > Signed-off-by: Mohamad Al-Jaf <<a
            href="mailto:mohamadaljaf@gmail.com" target="_blank"
            moz-do-not-send="true">mohamadaljaf@gmail.com</a>><br>
          > ---<br>
          >  .../api-ms-win-appmodel-runtime-l1-1-2.spec        |  2
          +-<br>
          >  dlls/kernelbase/kernelbase.spec                    |  2
          +-<br>
          >  dlls/kernelbase/main.c                             | 14
          ++++++++++++++<br>
          >  include/appmodel.h                                 |  6
          ++++++<br>
          >  4 files changed, 22 insertions(+), 2 deletions(-)<br>
          <br>
          Apparently kernel32 also has AppPolicy exports, please add a
          forward<br>
          there too.<br>
          <br>
          > diff --git a/dlls/kernelbase/main.c
          b/dlls/kernelbase/main.c<br>
          > index b90ee1cba2c..e6cf892a4dc 100644<br>
          > --- a/dlls/kernelbase/main.c<br>
          > +++ b/dlls/kernelbase/main.c<br>
          > @@ -88,6 +88,20 @@ INT WINAPI MulDiv( INT a, INT b, INT c
          )<br>
          >      return ret;<br>
          >  }<br>
          >  <br>
          >
+/***********************************************************************<br>
          > + *          AppPolicyGetMediaFoundationCodecLoading
          (KERNELBASE.@)<br>
          > + */<br>
          > +<br>
          > +LONG WINAPI
          AppPolicyGetMediaFoundationCodecLoading(HANDLE token,
          AppPolicyMediaFoundationCodecLoading *policy)<br>
          > +{<br>
          > +    FIXME("%p, %p\n", token, policy);<br>
          > +<br>
          > +    if(policy)<br>
          > +        *policy =
          AppPolicyMediaFoundationCodecLoading_All;<br>
          > +<br>
          > +    return ERROR_SUCCESS;<br>
          > +}<br>
          <br>
          Thanks, this seems to match what unpackaged binary gets
          according to my<br>
          quick test, so that's good.<br>
          <br>
          > +<br>
          > 
          /***********************************************************************<br>
          >   *          AppPolicyGetProcessTerminationMethod
          (KERNELBASE.@)<br>
          >   */<br>
          > diff --git a/include/appmodel.h b/include/appmodel.h<br>
          > index e4288bbfbb0..cf1b9659d14 100644<br>
          > --- a/include/appmodel.h<br>
          > +++ b/include/appmodel.h<br>
          > @@ -22,6 +22,12 @@<br>
          >  extern "C" {<br>
          >  #endif<br>
          >  <br>
          > +typedef enum AppPolicyMediaFoundationCodecLoading<br>
          > +{<br>
          > +    AppPolicyMediaFoundationCodecLoading_All       = 0,<br>
          > +    AppPolicyMediaFoundationCodecLoading_InboxOnly = 1,<br>
          > +} AppPolicyMediaFoundationCodecLoading;<br>
          > +<br>
          >  typedef enum AppPolicyProcessTerminationMethod<br>
          >  {<br>
          >      AppPolicyProcessTerminationMethod_ExitProcess      =
          0,<br>
          Please add function prototype as well.<br>
          <br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>