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.
November 29, 2021 7:08 PM, "Mohamad Al-Jaf" <mohamadaljaf@gmail.com (mailto:mohamadaljaf@gmail.com?to=%22Mohamad%20Al-Jaf%22%20mohamadaljaf@gmail.com)> wrote: E-mail resend: Forgot to reply-all. 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? On Mon, Nov 29, 2021 at 3:11 AM Nikolay Sivov <nsivov@codeweavers.com (mailto:nsivov@codeweavers.com)> wrote:It's possible it should be using -import for this function. Chip