Hi,
Am 07.04.2014 03:08, schrieb Dmitry Timoshkov:
Sebastian Lackner sebastian@fds-team.de wrote:
+BOOLEAN CDECL RtlInstallFunctionTableCallback( DWORD64 table, DWORD64 base, DWORD length,
PGET_RUNTIME_FUNCTION_CALLBACK callback, PVOID context, PCWSTR dll )
+{
spec entry doesn't match the implementation. Probably it should be (int64 int64 long ptr ptr wstr)
RtlInstallFunctionTableCallback on ARM takes regular DWORDs as arguments. My idea was to use the same trick as for RtlAddFunctionTable, to make it possible to use the same spec file entry for both x86_64 and for ARM (if someone else implements the function later). If int64 != long on 64-bit systems then this entry would also be invalid:
declaration: BOOLEAN CDECL RtlAddFunctionTable( RUNTIME_FUNCTION *table, DWORD count, DWORD64 addr )
specfile: @ cdecl -arch=arm,x86_64 RtlAddFunctionTable(ptr long long)
But I have to agree for the ptr -> wstr replacement, which is probably a bit better, although I haven't seen any applications yet that use it (they all just pass NULL pointers). I'll wait for some more feedback and resubmit the patch if this is the only change.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680595%28v=vs.85%2... claims that RtlInstallFunctionTableCallback is WINAPI, not CDECL, which one is correct?
Based on winnt.h on my Windows 8 machine with it is __cdecl, so i guess MSDN is wrong - but it wouldn't matter anyway because there is only one calling convention on x86_64, see: http://source.winehq.org/source/include/windef.h#L67
Regards, Sebastian