mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
You can't use NtCurrentTeb() in kernel mode
svn path=/trunk/; revision=8704
This commit is contained in:
parent
85f9fdf39f
commit
57b26979cb
1 changed files with 4 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: error.c,v 1.6 2003/08/12 20:08:45 royce Exp $
|
||||
/* $Id: error.c,v 1.7 2004/03/14 11:25:33 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -27,6 +27,7 @@
|
|||
* 06-06-2001 CSH Created
|
||||
*/
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ps.h>
|
||||
#include <include/error.h>
|
||||
|
||||
|
||||
|
@ -39,7 +40,7 @@ SetLastNtError(NTSTATUS Status)
|
|||
VOID FASTCALL
|
||||
SetLastWin32Error(DWORD Status)
|
||||
{
|
||||
PTEB Teb = NtCurrentTeb();
|
||||
PTEB Teb = PsGetCurrentThread()->Tcb.Teb;
|
||||
|
||||
if (NULL != Teb)
|
||||
{
|
||||
|
@ -51,7 +52,7 @@ NTSTATUS FASTCALL
|
|||
GetLastNtError()
|
||||
{
|
||||
// FIXME - not 100% sure this is correct
|
||||
PTEB Teb = NtCurrentTeb();
|
||||
PTEB Teb = PsGetCurrentThread()->Tcb.Teb;
|
||||
|
||||
if ( NULL != Teb )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue