<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">You can examine GetProcAddress result. E. g. call GetProcAddress for the function in question from kernel32 and kernelbase and see if the result is the same or not.</div><div dir="ltr"><br><blockquote type="cite">On 30 Nov 2021, at 07:31, Mohamad Al-Jaf <mohamadaljaf@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Hi Chip,<div><br></div><div>Thanks for the detailed explanation, I think I understand the difference between the two now. But how do you determine if a function should be forwarded or imported? Is there a way to find out for certain? So for SetCachedSigningLevel, how can I know if it's better to forward it or import it?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 29, 2021 at 9:57 PM Chip Davis <<a href="mailto:cdavis@codeweavers.com">cdavis@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"><u></u><div><div style="font-family:arial,sans-serif;font-size:13px">Normally, a forwarded function gets a special export entry which records the name of the DLL that has the real implementation and the name or ordinal of the target function. That way, when the loader resolves imports, it can resolve them directly to the real implementation instead of to a thunk in the imported DLL, like you'd have otherwise. But on Windows, a number of functions that would otherwise be forwarded to kernelbase from kernel32 instead use these thunks that call the target in kernelbase--presumably because existing programs abuse hotpatching to hook functions that were in kernel32. For these cases, winebuild supports a special option on a forwarded export which causes it to generate this thunk.<br><br>November 29, 2021 7:08 PM, "Mohamad Al-Jaf" <<a href="mailto:mohamadaljaf@gmail.com?to=%22Mohamad%20Al-Jaf%22%20%3Cmohamadaljaf@gmail.com%3E" target="_blank">mohamadaljaf@gmail.com</a>> wrote:<br> <blockquote><div><div><div dir="ltr"><div>E-mail resend: Forgot to reply-all.</div><div></div>Interesting, why do you think this? How does one know how to find out if forwarding or importing is more appropriate? Also, what exactly is the difference between the two?</div> <div><div dir="ltr">On Mon, Nov 29, 2021 at 3:11 AM Nikolay Sivov <<a rel="external nofollow noopener noreferrer" href="mailto:nsivov@codeweavers.com" target="_blank">nsivov@codeweavers.com</a>> wrote:</div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It's possible it should be using -import for this function.<br> </blockquote></div></div></div></blockquote><br><br><u></u>Chip<u></u></div></div>
</blockquote></div>
</div></blockquote></body></html>