[KERNEL32]: Move some definitions to header file.

[KERNEL32]: MoveBasepLocateExeLdrEntry to utils.c.

svn path=/trunk/; revision=54166
This commit is contained in:
Alex Ionescu
2011-10-16 17:05:16 +00:00
parent f0ac874b67
commit a4ea03f3c4
4 changed files with 52 additions and 52 deletions
@@ -11,27 +11,6 @@
#define NDEBUG
#include <debug.h>
typedef struct tagLOADPARMS32 {
LPSTR lpEnvAddress;
LPSTR lpCmdLine;
WORD wMagicValue;
WORD wCmdShow;
DWORD dwReserved;
} LOADPARMS32;
extern BOOLEAN InWindows;
extern WaitForInputIdleType lpfnGlobalRegisterWaitForInputIdle;
#define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_ERROR 1
#define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_SUCCESS 2
#define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_CONTINUE 3
VOID
NTAPI
BasepLocateExeLdrEntry(IN PLDR_DATA_TABLE_ENTRY Entry,
IN PVOID Context,
OUT BOOLEAN *StopEnumeration);
/* FUNCTIONS ****************************************************************/
DWORD
-31
View File
@@ -374,37 +374,6 @@ BasepDuplicateAndWriteHandle(IN HANDLE ProcessHandle,
}
}
VOID
NTAPI
BasepLocateExeLdrEntry(IN PLDR_DATA_TABLE_ENTRY Entry,
IN PVOID Context,
OUT BOOLEAN *StopEnumeration)
{
/* Make sure we get Entry, Context and valid StopEnumeration pointer */
ASSERT(Entry);
ASSERT(Context);
ASSERT(StopEnumeration);
/* If entry is already found - signal to stop */
if (BasepExeLdrEntry)
{
/* Signal to stop enumeration and return */
*StopEnumeration = TRUE;
return;
}
/* We don't have a exe ldr entry, so try to see if this one is ours
by matching base address */
if (Entry->DllBase == Context)
{
/* It matches, so remember the ldr entry */
BasepExeLdrEntry = Entry;
/* And stop enumeration */
*StopEnumeration = TRUE;
}
}
LPWSTR
WINAPI
BasepGetProcessPath(DWORD Reserved,
+28
View File
@@ -25,6 +25,34 @@ PRTL_CONVERT_STRING Basep8BitStringToUnicodeString;
/* FUNCTIONS ****************************************************************/
VOID
NTAPI
BasepLocateExeLdrEntry(IN PLDR_DATA_TABLE_ENTRY Entry,
IN PVOID Context,
OUT BOOLEAN *StopEnumeration)
{
/* Make sure we get Entry, Context and valid StopEnumeration pointer */
ASSERT(Entry);
ASSERT(Context);
ASSERT(StopEnumeration);
/* If entry is already found - signal to stop */
if (BasepExeLdrEntry)
{
*StopEnumeration = TRUE;
return;
}
/* Otherwise keep enumerating until we find a match */
if (Entry->DllBase == Context)
{
/* It matches, so remember the ldr entry */
BasepExeLdrEntry = Entry;
/* And stop enumeration */
*StopEnumeration = TRUE;
}
}
/*
* Converts an ANSI or OEM String to the TEB StaticUnicodeString
@@ -80,6 +80,20 @@ typedef struct _CODEPAGE_ENTRY
CPTABLEINFO CodePageTable;
} CODEPAGE_ENTRY, *PCODEPAGE_ENTRY;
typedef struct tagLOADPARMS32 {
LPSTR lpEnvAddress;
LPSTR lpCmdLine;
WORD wMagicValue;
WORD wCmdShow;
DWORD dwReserved;
} LOADPARMS32;
#define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_ERROR 1
#define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_SUCCESS 2
#define BASEP_GET_MODULE_HANDLE_EX_PARAMETER_VALIDATION_CONTINUE 3
extern PBASE_STATIC_SERVER_DATA BaseStaticServerData;
typedef
@@ -88,6 +102,10 @@ DWORD
HANDLE hProcess,
DWORD dwMilliseconds);
extern BOOLEAN InWindows;
extern WaitForInputIdleType lpfnGlobalRegisterWaitForInputIdle;
/* GLOBAL VARIABLES **********************************************************/
extern BOOL bIsFileApiAnsi;
@@ -260,3 +278,9 @@ DuplicateConsoleHandle(HANDLE hConsole,
BOOL bInheritHandle,
DWORD dwOptions);
VOID
NTAPI
BasepLocateExeLdrEntry(IN PLDR_DATA_TABLE_ENTRY Entry,
IN PVOID Context,
OUT BOOLEAN *StopEnumeration);