Author: tkreuzer Date: Tue Jan 7 20:23:44 2014 New Revision: 61568
URL: http://svn.reactos.org/svn/reactos?rev=61568&view=rev Log: [RTL/NDK/NTDLL] - Fix calling convention of RtlSetProcessIsCritical and RtlSetThreadIsCritical (they are __cdecl!) [NDK] - Add missing extern "C"
Modified: trunk/reactos/dll/ntdll/def/ntdll.spec trunk/reactos/include/ndk/mmtypes.h trunk/reactos/include/ndk/rtlfuncs.h trunk/reactos/lib/rtl/process.c trunk/reactos/lib/rtl/thread.c
Modified: trunk/reactos/dll/ntdll/def/ntdll.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.spec?re... ============================================================================== --- trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] Tue Jan 7 20:23:44 2014 @@ -846,7 +846,7 @@ @ stdcall RtlSetLastWin32ErrorAndNtStatusFromNtStatus(long) @ stdcall RtlSetMemoryStreamSize(ptr int64) @ stdcall RtlSetOwnerSecurityDescriptor(ptr ptr long) -@ stdcall RtlSetProcessIsCritical(long ptr long) +@ cdecl RtlSetProcessIsCritical(long ptr long) ;@ stdcall RtlSetProperties ; RtlSetProperties ;@ stdcall RtlSetPropertyClassId ; 4.0 only ;@ stdcall RtlSetPropertyNames ; 4.0 only @@ -856,7 +856,7 @@ @ stdcall RtlSetSecurityObject(long ptr ptr ptr ptr) @ stdcall RtlSetSecurityObjectEx(long ptr ptr long ptr ptr) @ stdcall RtlSetThreadErrorMode(long ptr) -@ stdcall RtlSetThreadIsCritical(long ptr long) +@ cdecl RtlSetThreadIsCritical(long ptr long) @ stdcall RtlSetThreadPoolStartFunc(ptr ptr) @ stdcall RtlSetTimeZoneInformation(ptr) ;@ stdcall RtlSetTimer
Modified: trunk/reactos/include/ndk/mmtypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmtypes.h?rev=6... ============================================================================== --- trunk/reactos/include/ndk/mmtypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/mmtypes.h [iso-8859-1] Tue Jan 7 20:23:44 2014 @@ -25,6 +25,10 @@ #include <umtypes.h> #include <arch/mmtypes.h> #include <extypes.h> + +#ifdef __cplusplus +extern "C" { +#endif
// // Page-Rounding Macros @@ -1037,4 +1041,8 @@
#endif // !NTOS_MODE_USER
+#ifdef __cplusplus +} // extern "C" +#endif + #endif // _MMTYPES_H
Modified: trunk/reactos/include/ndk/rtlfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev=... ============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Tue Jan 7 20:23:44 2014 @@ -2564,7 +2564,7 @@
NTSYSAPI NTSTATUS -NTAPI +__cdecl RtlSetProcessIsCritical( _In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, @@ -2573,7 +2573,7 @@
NTSYSAPI NTSTATUS -NTAPI +__cdecl RtlSetThreadIsCritical( _In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, @@ -4244,7 +4244,7 @@ NTSYSAPI HRESULT NTAPI -RtlQueryInterfaceMemoryStream( +RtlQueryInterfaceMemoryStream( _In_ struct IStream *This, _In_ REFIID RequestedIid, _Outptr_ PVOID *ResultObject @@ -4253,21 +4253,21 @@ NTSYSAPI ULONG NTAPI -RtlAddRefMemoryStream( +RtlAddRefMemoryStream( _In_ struct IStream *This );
NTSYSAPI ULONG NTAPI -RtlReleaseMemoryStream( +RtlReleaseMemoryStream( _In_ struct IStream *This );
NTSYSAPI HRESULT NTAPI -RtlReadMemoryStream( +RtlReadMemoryStream( _In_ struct IStream *This, _Out_writes_bytes_(Length) PVOID Buffer, _In_ ULONG Length, @@ -4277,7 +4277,7 @@ NTSYSAPI HRESULT NTAPI -RtlReadOutOfProcessMemoryStream( +RtlReadOutOfProcessMemoryStream( _In_ struct IStream *This, _Out_writes_bytes_(Length) PVOID Buffer, _In_ ULONG Length, @@ -4287,7 +4287,7 @@ NTSYSAPI HRESULT NTAPI -RtlSeekMemoryStream( +RtlSeekMemoryStream( _In_ struct IStream *This, _In_ LARGE_INTEGER RelativeOffset, _In_ ULONG Origin, @@ -4297,7 +4297,7 @@ NTSYSAPI HRESULT NTAPI -RtlCopyMemoryStreamTo( +RtlCopyMemoryStreamTo( _In_ struct IStream *This, _In_ struct IStream *Target, _In_ ULARGE_INTEGER Length, @@ -4308,7 +4308,7 @@ NTSYSAPI HRESULT NTAPI -RtlCopyOutOfProcessMemoryStreamTo( +RtlCopyOutOfProcessMemoryStreamTo( _In_ struct IStream *This, _In_ struct IStream *Target, _In_ ULARGE_INTEGER Length, @@ -4319,7 +4319,7 @@ NTSYSAPI HRESULT NTAPI -RtlStatMemoryStream( +RtlStatMemoryStream( _In_ struct IStream *This, _Out_ struct tagSTATSTG *Stats, _In_ ULONG Flags @@ -4329,7 +4329,7 @@ NTSYSAPI HRESULT NTAPI -RtlWriteMemoryStream( +RtlWriteMemoryStream( _In_ struct IStream *This, _In_reads_bytes_(Length) CONST VOID *Buffer, _In_ ULONG Length, @@ -4339,7 +4339,7 @@ NTSYSAPI HRESULT NTAPI -RtlSetMemoryStreamSize( +RtlSetMemoryStreamSize( _In_ struct IStream *This, _In_ ULARGE_INTEGER NewSize ); @@ -4347,7 +4347,7 @@ NTSYSAPI HRESULT NTAPI -RtlCommitMemoryStream( +RtlCommitMemoryStream( _In_ struct IStream *This, _In_ ULONG CommitFlags ); @@ -4355,14 +4355,14 @@ NTSYSAPI HRESULT NTAPI -RtlRevertMemoryStream( +RtlRevertMemoryStream( _In_ struct IStream *This );
NTSYSAPI HRESULT NTAPI -RtlLockMemoryStreamRegion( +RtlLockMemoryStreamRegion( _In_ struct IStream *This, _In_ ULARGE_INTEGER Offset, _In_ ULARGE_INTEGER Length, @@ -4372,7 +4372,7 @@ NTSYSAPI HRESULT NTAPI -RtlUnlockMemoryStreamRegion( +RtlUnlockMemoryStreamRegion( _In_ struct IStream *This, _In_ ULARGE_INTEGER Offset, _In_ ULARGE_INTEGER Length, @@ -4382,7 +4382,7 @@ NTSYSAPI HRESULT NTAPI -RtlCloneMemoryStream( +RtlCloneMemoryStream( _In_ struct IStream *This, _Outptr_ struct IStream **ResultStream );
Modified: trunk/reactos/lib/rtl/process.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/process.c?rev=61568... ============================================================================== --- trunk/reactos/lib/rtl/process.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/process.c [iso-8859-1] Tue Jan 7 20:23:44 2014 @@ -357,7 +357,7 @@ * http://www.geoffchappell.com/studies/windows/win32/ntdll/api/rtl/peb/setproc... */ NTSTATUS -NTAPI +__cdecl RtlSetProcessIsCritical(IN BOOLEAN NewValue, OUT PBOOLEAN OldValue OPTIONAL, IN BOOLEAN NeedBreaks)
Modified: trunk/reactos/lib/rtl/thread.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/thread.c?rev=61568&... ============================================================================== --- trunk/reactos/lib/rtl/thread.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/thread.c [iso-8859-1] Tue Jan 7 20:23:44 2014 @@ -158,7 +158,7 @@ * @implemented */ NTSTATUS -NTAPI +__cdecl RtlSetThreadIsCritical(IN BOOLEAN NewValue, OUT PBOOLEAN OldValue OPTIONAL, IN BOOLEAN NeedBreaks)