在 2020/6/2 23:01, Zebediah Figura 写道: > > My understanding is that NTAPI is necessary even where not present in > Microsoft's headers, in order to add a calling-convention attribute to > functions that do not otherwise have it. See e.g. KdDisableDebugger() > and PPCI_EXPRESS_ROOT_PORT_WRITE_CONFIG_SPACE, to pick two examples at > random.
Without a calling convention specification the default one is `__cdecl`, and will probably cause crashes if they don't match. MSVC has an option to set default calling convention to `__stdcall`, but I am not sure about whether it is the default for kernel-mode libraries. -- Best regards, LH_Mouse
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
