> From: Ian Lance Taylor <[email protected]>
> Date: Mon, 29 Jul 2024 09:46:46 -0700
> Cc: Eli Zaretskii <[email protected]>, [email protected], [email protected]
>
> On Fri, Mar 15, 2024 at 1:41 PM Björn Schäpers <[email protected]> wrote:
> >
> > Am 10.01.2024 um 13:34 schrieb Eli Zaretskii:
> > >> Date: Tue, 9 Jan 2024 21:02:44 +0100
> > >> Cc: [email protected], [email protected], [email protected]
> > >> From: Björn Schäpers <[email protected]>
> > >>
> > >> Am 07.01.2024 um 18:03 schrieb Eli Zaretskii:
> > >>> In that case, you an call either GetModuleHandeExA or
> > >>> GetModuleHandeExW, the difference is minor.
> > >>
> > >> Here an updated version without relying on TEXT or TCHAR, directly
> > >> calling
> > >> GetModuleHandleExW.
> > >
> > > Thanks, this LGTM (but I couldn't test it, I just looked at the
> > > sour ce code).
> >
> > Here an updated version. It is rebased on the combined approach of getting
> > the
> > loaded DLLs and two minor changes to suppress warnings.
>
> This bug report was filed about this patch:
>
> https://github.com/ianlancetaylor/libbacktrace/issues/131
>
> > src\pecoff.c(86): error C2059: syntax error: '('
> > src\pecoff.c(89): error C2059: syntax error: '('
> >
> > It works fine if deleting CALLBACK and NTAPI.
>
> Any ideas?
Instead of deleting those, move them inside the parentheses:
typedef VOID (CALLBACK *LDR_DLL_NOTIFICATION)(ULONG,
struct dll_notification_data*,
PVOID);
typedef NTSTATUS (NTAPI *LDR_REGISTER_FUNCTION)(ULONG,
LDR_DLL_NOTIFICATION, PVOID,
PVOID*);
and also I think you need to include <ntdef.h>, for the definition
of the NTSTATUS type.
Caveat: I don't have MSVC, so I couldn't verify that these measures
fix the problem, sorry.