Author: ion
Date: Sun Jan 3 16:23:38 2016
New Revision: 70483
URL:
http://svn.reactos.org/svn/reactos?rev=70483&view=rev
Log:
[NDK]: Document RtlPushFrame, RtlPopFrame, RtlGetFrame.
[NDK]: Add TEB_ACTIVE_FRAME_CONTEXT_FLAG_EXTENDED, TEB_ACTIVE_FRAME_EX,
TEB_ACTIVE_FRAME_CONTEXT_EX from the CoreCLR sources (clrnt.h)
[RTL]: Implement RtlPushFrame, RtlPopFrame, RtlGetFrame.
[NTDLL]: Export the above.
[RTL]: Fix MSVC warning after someone's earlier WINE merge.
Modified:
trunk/reactos/dll/ntdll/def/ntdll.spec
trunk/reactos/include/ndk/pstypes.h
trunk/reactos/include/ndk/rtlfuncs.h
trunk/reactos/lib/cmlib/cmlib.h
trunk/reactos/lib/rtl/actctx.c
trunk/reactos/lib/rtl/debug.c
Modified: trunk/reactos/dll/ntdll/def/ntdll.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.spec?r…
==============================================================================
--- trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] Sun Jan 3 16:23:38 2016
@@ -655,7 +655,7 @@
653 stdcall RtlGetDaclSecurityDescriptor(ptr ptr ptr ptr)
654 stdcall RtlGetElementGenericTable(ptr long)
655 stdcall RtlGetElementGenericTableAvl(ptr long)
-# stdcall RtlGetFrame
+656 stdcall RtlGetFrame()
657 stdcall RtlGetFullPathName_U(wstr long ptr ptr)
658 stdcall RtlGetFullPathName_UstrEx(ptr ptr ptr ptr ptr ptr ptr ptr)
659 stdcall RtlGetGroupSecurityDescriptor(ptr ptr ptr)
@@ -797,11 +797,11 @@
792 stdcall RtlOpenCurrentUser(long ptr)
793 stdcall RtlPcToFileHeader(ptr ptr)
794 stdcall RtlPinAtomInAtomTable(ptr long)
-# stdcall RtlPopFrame
+795 stdcall RtlPopFrame(ptr)
796 stdcall RtlPrefixString(ptr ptr long)
797 stdcall RtlPrefixUnicodeString(ptr ptr long)
798 stdcall RtlProtectHeap(ptr long)
-# stdcall RtlPushFrame
+799 stdcall RtlPushFrame(ptr)r
800 stdcall RtlQueryAtomInAtomTable(ptr long ptr ptr ptr ptr)
801 stdcall RtlQueryDepthSList(ptr)
802 stdcall RtlQueryEnvironmentVariable_U(ptr ptr ptr)
Modified: trunk/reactos/include/ndk/pstypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/pstypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/pstypes.h [iso-8859-1] Sun Jan 3 16:23:38 2016
@@ -181,6 +181,11 @@
// TLS Slots
//
#define TLS_MINIMUM_AVAILABLE 64
+
+//
+// TEB Active Frame Flags
+//
+#define TEB_ACTIVE_FRAME_CONTEXT_FLAG_EXTENDED 0x1
//
// Job Access Types
@@ -684,13 +689,29 @@
ULONG Flags;
LPSTR FrameName;
} TEB_ACTIVE_FRAME_CONTEXT, *PTEB_ACTIVE_FRAME_CONTEXT;
+typedef const struct _TEB_ACTIVE_FRAME_CONTEXT *PCTEB_ACTIVE_FRAME_CONTEXT;
+
+typedef struct _TEB_ACTIVE_FRAME_CONTEXT_EX
+{
+ TEB_ACTIVE_FRAME_CONTEXT BasicContext;
+ PCSTR SourceLocation;
+} TEB_ACTIVE_FRAME_CONTEXT_EX, *PTEB_ACTIVE_FRAME_CONTEXT_EX;
+typedef const struct _TEB_ACTIVE_FRAME_CONTEXT_EX *PCTEB_ACTIVE_FRAME_CONTEXT_EX;
typedef struct _TEB_ACTIVE_FRAME
{
ULONG Flags;
struct _TEB_ACTIVE_FRAME *Previous;
- PTEB_ACTIVE_FRAME_CONTEXT Context;
+ PCTEB_ACTIVE_FRAME_CONTEXT Context;
} TEB_ACTIVE_FRAME, *PTEB_ACTIVE_FRAME;
+typedef const struct _TEB_ACTIVE_FRAME *PCTEB_ACTIVE_FRAME;
+
+typedef struct _TEB_ACTIVE_FRAME_EX
+{
+ TEB_ACTIVE_FRAME BasicFrame;
+ PVOID ExtensionIdentifier;
+} TEB_ACTIVE_FRAME_EX, *PTEB_ACTIVE_FRAME_EX;
+typedef const struct _TEB_ACTIVE_FRAME_EX *PCTEB_ACTIVE_FRAME_EX;
typedef struct _CLIENT_ID32
{
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] Sun Jan 3 16:23:38 2016
@@ -3004,6 +3004,30 @@
_In_ USHORT CompressionFormatAndEngine,
_Out_ PULONG CompressBufferWorkSpaceSize,
_Out_ PULONG CompressFragmentWorkSpaceSize
+);
+
+//
+// Frame Functions
+//
+NTSYSAPI
+VOID
+NTAPI
+RtlPopFrame(
+ _In_ PTEB_ACTIVE_FRAME Frame
+);
+
+NTSYSAPI
+VOID
+NTAPI
+RtlPushFrame(
+ _In_ PTEB_ACTIVE_FRAME Frame
+);
+
+NTSYSAPI
+PTEB_ACTIVE_FRAME
+NTAPI
+RtlGetFrame(
+ VOID
);
//
Modified: trunk/reactos/lib/cmlib/cmlib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=7048…
==============================================================================
--- trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] Sun Jan 3 16:23:38 2016
@@ -455,6 +455,32 @@
IN PCUNICODE_STRING SearchName
);
+HCELL_INDEX
+NTAPI
+CmpFindSubKeyByNumber(
+ IN PHHIVE Hive,
+ IN PCM_KEY_NODE Node,
+ IN ULONG Number
+ );
+
+PCELL_DATA
+NTAPI
+CmpValueToData(
+ IN PHHIVE Hive,
+ IN PCM_KEY_VALUE Value,
+ OUT PULONG Length
+ );
+
+BOOLEAN
+NTAPI
+CmpFindNameInList(
+ IN PHHIVE Hive,
+ IN PCHILD_LIST ChildList,
+ IN PUNICODE_STRING Name,
+ IN PULONG ChildIndex,
+ IN PHCELL_INDEX CellIndex
+ );
+
/* To be implemented by the user of this library */
PVOID
NTAPI
Modified: trunk/reactos/lib/rtl/actctx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=70483…
==============================================================================
--- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Sun Jan 3 16:23:38 2016
@@ -3173,7 +3173,7 @@
DPRINT("%d: dll name %S\n", j, dll->name);
/* setup new index entry */
str.Buffer = dll->name;
- str.Length = strlenW(dll->name)*sizeof(WCHAR);
+ str.Length = (USHORT)strlenW(dll->name)*sizeof(WCHAR);
str.MaximumLength = str.Length + sizeof(WCHAR);
/* hash original class name */
RtlHashUnicodeString(&str, TRUE, HASH_STRING_ALGORITHM_X65599,
&index->hash);
@@ -3390,7 +3390,7 @@
/* setup new index entry */
str.Buffer = entity->u.class.name;
- str.Length = strlenW(entity->u.class.name)*sizeof(WCHAR);
+ str.Length = (USHORT)strlenW(entity->u.class.name)*sizeof(WCHAR);
str.MaximumLength = str.Length + sizeof(WCHAR);
/* hash original class name */
RtlHashUnicodeString(&str, TRUE, HASH_STRING_ALGORITHM_X65599,
&index->hash);
Modified: trunk/reactos/lib/rtl/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=70483&…
==============================================================================
--- trunk/reactos/lib/rtl/debug.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/debug.c [iso-8859-1] Sun Jan 3 16:23:38 2016
@@ -389,3 +389,34 @@
/* Send them to the debugger */
DebugService2(&NameString, &CommandString, BREAKPOINT_COMMAND_STRING);
}
+
+/*
+* @implemented
+*/
+VOID
+NTAPI
+RtlPopFrame(IN PTEB_ACTIVE_FRAME Frame)
+{
+ /* Restore the previous frame as the active one */
+ NtCurrentTeb()->ActiveFrame = Frame->Previous;
+}
+
+/*
+* @implemented
+*/
+VOID
+NTAPI
+RtlPushFrame(IN PTEB_ACTIVE_FRAME Frame)
+{
+ /* Save the current frame and set the new one as active */
+ Frame->Previous = NtCurrentTeb()->ActiveFrame;
+ NtCurrentTeb()->ActiveFrame = Frame;
+}
+
+PTEB_ACTIVE_FRAME
+NTAPI
+RtlGetFrame(VOID)
+{
+ /* Return the frame that's currently active */
+ return NtCurrentTeb()->ActiveFrame;
+}