Commit in reactos on MAIN
lib/kernel32/thread/thread.c+23-131.52 -> 1.53
w32api/include/ddk/ntapi.h+51.6 -> 1.7
+28-13
2 modified files
1. implemented GetThreadSelectorEntry()
2. added missing DESCRIPTOR_TABLE_ENTRY structure

reactos/lib/kernel32/thread
thread.c 1.52 -> 1.53
diff -u -r1.52 -r1.53
--- thread.c	19 Sep 2004 12:45:55 -0000	1.52
+++ thread.c	24 Sep 2004 20:55:58 -0000	1.53
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.52 2004/09/19 12:45:55 weiden Exp $
+/* $Id: thread.c,v 1.53 2004/09/24 20:55:58 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -365,14 +365,13 @@
 	       LPFILETIME lpUserTime)
 {
   KERNEL_USER_TIMES KernelUserTimes;
-  ULONG ReturnLength;
   NTSTATUS Status;
 
   Status = NtQueryInformationThread(hThread,
 				    ThreadTimes,
 				    &KernelUserTimes,
 				    sizeof(KERNEL_USER_TIMES),
-				    &ReturnLength);
+				    NULL);
   if (!NT_SUCCESS(Status))
     {
       SetLastErrorByStatus(Status);
@@ -445,14 +444,13 @@
 		  LPDWORD lpExitCode)
 {
   THREAD_BASIC_INFORMATION ThreadBasic;
-  ULONG DataWritten;
   NTSTATUS Status;
 
   Status = NtQueryInformationThread(hThread,
 				    ThreadBasicInformation,
 				    &ThreadBasic,
 				    sizeof(THREAD_BASIC_INFORMATION),
-				    &DataWritten);
+				    NULL);
   if (!NT_SUCCESS(Status))
     {
       SetLastErrorByStatus(Status);
@@ -543,7 +541,6 @@
 {
   THREAD_BASIC_INFORMATION ThreadBasic;
   KAFFINITY AffinityMask;
-  ULONG DataWritten;
   NTSTATUS Status;
 
   AffinityMask = (KAFFINITY)dwThreadAffinityMask;
@@ -552,7 +549,7 @@
 				    ThreadBasicInformation,
 				    &ThreadBasic,
 				    sizeof(THREAD_BASIC_INFORMATION),
-				    &DataWritten);
+				    NULL);
   if (!NT_SUCCESS(Status))
     {
       SetLastErrorByStatus(Status);
@@ -602,14 +599,13 @@
 GetThreadPriority(HANDLE hThread)
 {
   THREAD_BASIC_INFORMATION ThreadBasic;
-  ULONG DataWritten;
   NTSTATUS Status;
 
   Status = NtQueryInformationThread(hThread,
 				    ThreadBasicInformation,
 				    &ThreadBasic,
 				    sizeof(THREAD_BASIC_INFORMATION),
-				    &DataWritten);
+				    NULL);
   if (!NT_SUCCESS(Status))
     {
       SetLastErrorByStatus(Status);
@@ -628,14 +624,13 @@
 		       OUT PBOOL pDisablePriorityBoost)
 {
   ULONG PriorityBoost;
-  ULONG DataWritten;
   NTSTATUS Status;
 
   Status = NtQueryInformationThread(hThread,
 				    ThreadPriorityBoost,
 				    &PriorityBoost,
 				    sizeof(ULONG),
-				    &DataWritten);
+				    NULL);
   if (!NT_SUCCESS(Status))
     {
       SetLastErrorByStatus(Status);
@@ -682,8 +677,23 @@
 		       IN DWORD dwSelector,
 		       OUT LPLDT_ENTRY lpSelectorEntry)
 {
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  return(FALSE);
+  DESCRIPTOR_TABLE_ENTRY DescriptionTableEntry;
+  NTSTATUS Status;
+  
+  DescriptionTableEntry.Selector = dwSelector;
+  Status = NtQueryInformationThread(hThread,
+                                    ThreadDescriptorTableEntry,
+                                    &DescriptionTableEntry,
+                                    sizeof(DESCRIPTOR_TABLE_ENTRY),
+                                    NULL);
+  if(!NT_SUCCESS(Status))
+  {
+    SetLastErrorByStatus(Status);
+    return FALSE;
+  }
+
+  *lpSelectorEntry = DescriptionTableEntry.Descriptor;
+  return TRUE;
 }
 
 

reactos/w32api/include/ddk
ntapi.h 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- ntapi.h	21 Sep 2004 22:07:38 -0000	1.6
+++ ntapi.h	24 Sep 2004 20:55:58 -0000	1.7
@@ -1254,6 +1254,11 @@
 	LARGE_INTEGER  UserTime;
 } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
 
+typedef struct _DESCRIPTOR_TABLE_ENTRY {
+	ULONG Selector;
+	LDT_ENTRY Descriptor;
+} DESCRIPTOR_TABLE_ENTRY, *PDESCRIPTOR_TABLE_ENTRY;
+
 NTOSAPI
 NTSTATUS
 NTAPI
CVSspam 0.2.8