https://bugs.winehq.org/show_bug.cgi?id=57711
mushu csumushu@126.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #6 from mushu csumushu@126.com --- (In reply to Hans Leidekker from comment #5)
(In reply to mushu from comment #4)
(In reply to Hans Leidekker from comment #3)
(In reply to mushu from comment #2)
(In reply to Hans Leidekker from comment #1)
Created attachment 77914 [details] patch
Can you try this patch?
This patch resolves the issue. Could you explain how this problem came about? Why do 32-bit and 64-bit programs exhibit different behaviors?
We used the wrong calling convention (CALLBACK maps to 32-bit only __stdcall). It's ignored when building 64-bit, that's why it worked there.
I understand the reason for the behavioral differences between x64 and x32: __stdcall is ignored in ARM and x64 architectures. However, why is __stdcall considered the wrong calling convention? I noticed that many parts of the Wine source code use it.
The callback argument to pcap_loop() (pcap_handler) isn't defined as __stdcall in pcap.h.
I got it.Thank you.