From 85ae2d98f28ab77a74678d8481f4bc79ae920672 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 15 Jan 2005 16:42:28 +0000 Subject: [PATCH] janitory work svn path=/trunk/; revision=13060 --- reactos/lib/psapi/makefile | 2 +- reactos/lib/psapi/misc/dllmain.c | 34 -------------------------- reactos/lib/psapi/{win32.c => psapi.c} | 20 +++++++++++++-- 3 files changed, 19 insertions(+), 37 deletions(-) delete mode 100644 reactos/lib/psapi/misc/dllmain.c rename reactos/lib/psapi/{win32.c => psapi.c} (99%) diff --git a/reactos/lib/psapi/makefile b/reactos/lib/psapi/makefile index c76ef62c974..bf0eeea1d58 100644 --- a/reactos/lib/psapi/makefile +++ b/reactos/lib/psapi/makefile @@ -19,7 +19,7 @@ TARGET_BASE = $(TARGET_BASE_LIB_PSAPI) TARGET_PCH = precomp.h -TARGET_OBJECTS = misc/dllmain.o malloc.o win32.o +TARGET_OBJECTS = malloc.o psapi.o DEP_OBJECTS = $(TARGET_OBJECTS) diff --git a/reactos/lib/psapi/misc/dllmain.c b/reactos/lib/psapi/misc/dllmain.c deleted file mode 100644 index f3d489c5a28..00000000000 --- a/reactos/lib/psapi/misc/dllmain.c +++ /dev/null @@ -1,34 +0,0 @@ -/* $Id$ -*/ -/* - * COPYRIGHT: None - * LICENSE: Public domain - * PROJECT: ReactOS system libraries - * FILE: reactos/lib/psapi/misc/malloc.c - * PURPOSE: PSAPI.DLL main procedure - * PROGRAMMER: KJK::Hyperion - * UPDATE HISTORY: - * 28/11/2001: Created (Emanuele Aliberti ) - * 30/08/2002: Minimal tweak (KJK::Hyperion ) - */ -#include "precomp.h" - -#define NDEBUG -#include - -BOOLEAN STDCALL DllMain -( - PVOID hinstDll, - ULONG dwReason, - PVOID reserved -) -{ - if(dwReason == DLL_PROCESS_ATTACH) - /* don't bother calling the entry point on thread startup - PSAPI.DLL doesn't - store any per-thread data */ - LdrDisableThreadCalloutsForDll(hinstDll); - - return (TRUE); -} - -/* EOF */ diff --git a/reactos/lib/psapi/win32.c b/reactos/lib/psapi/psapi.c similarity index 99% rename from reactos/lib/psapi/win32.c rename to reactos/lib/psapi/psapi.c index 025610fe7f4..4e69e4e380b 100644 --- a/reactos/lib/psapi/win32.c +++ b/reactos/lib/psapi/psapi.c @@ -17,6 +17,22 @@ #define NDEBUG #include +BOOLEAN +WINAPI +DllMain(HINSTANCE hDllHandle, + DWORD nReason, + LPVOID Reserved) +{ + switch(nReason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hDllHandle); + break; + } + + return TRUE; +} + /* INTERNAL *******************************************************************/ typedef struct _ENUM_DEVICE_DRIVERS_CONTEXT @@ -935,7 +951,7 @@ InitializeProcessForWsWatch(HANDLE hProcess) 0); if(!NT_SUCCESS(Status)) { - SetLastError(RtlNtStatusToDosError(Status)); + SetLastErrorByStatus(Status); return FALSE; } @@ -961,7 +977,7 @@ GetWsChanges(HANDLE hProcess, NULL); if(!NT_SUCCESS(Status)) { - SetLastError(RtlNtStatusToDosError(Status)); + SetLastErrorByStatus(Status); return FALSE; }