[PATCH v4 1/4] wdscore: Implement CurrentIP.

Gabriel Ivăncescu gabrielopcode at gmail.com
Mon Jan 31 08:39:20 CST 2022


On 31/01/2022 11:18, Mohamad Al-Jaf wrote:
> Hi,
> 
>  > Every process has its own virtual address space (VAS) [1].
> 
> Thanks for the detailed explanation and also for the references. I 
> didn't know about Windows Internals, seems like a good book to learn 
> about how Windows works, much appreciated.
> 
>  > Since it has no arguments and is not a "public" exported function it
>> probably does not matter. But yes, using __ASM_STDCALL_FUNC without
>> declaring it as WINAPI is a mismatch. You should be using either
>> __ASM_GLOBAL_FUNC and no WINAPI, or __ASM_STDCALL_FUNC with WINAPI.
>  >
>  > I guess if the header doesn't use WINAPI, might as well make it without.
> 
> Yeah, I don't think it really matters. But I just want it to be as 
> accurate as possible to the Windows implementation. Thank you for the 
> clarification, I wasn't sure what to do.
> 

I share your sentiment, but in this case it is impossible to know, 
unless we can find it documented somewhere. From a binary signature 
standpoint, a function with 0 args is identical in STDCALL and CDECL, 
because it's not mangled in the DLL either (unlike lib), and the only 
source we have is that header that uses it.

So it doesn't really matter, just that the mismatch looked wrong (either 
both STDCALL or both CDECL is fine in my eyes, but not an authoritative 
opinion).



More information about the wine-devel mailing list