2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2004-01-23 21:16:04 +00:00
|
|
|
|
2010-08-07 16:01:30 +00:00
|
|
|
//
|
|
|
|
// Kernel32 Filter IDs
|
|
|
|
//
|
|
|
|
#define kernel32file 200
|
|
|
|
#define kernel32ver 201
|
|
|
|
#define actctx 202
|
|
|
|
#define resource 203
|
|
|
|
#define kernel32session 204
|
2013-12-22 18:10:41 +00:00
|
|
|
#define comm 205
|
|
|
|
#define profile 206
|
|
|
|
#define nls 207
|
2010-08-07 16:01:30 +00:00
|
|
|
|
2010-09-21 17:14:22 +00:00
|
|
|
|
|
|
|
#if DBG
|
|
|
|
#define DEBUG_CHANNEL(ch) static ULONG gDebugChannel = ch;
|
|
|
|
#else
|
|
|
|
#define DEBUG_CHANNEL(ch)
|
|
|
|
#endif
|
|
|
|
|
2010-08-07 16:01:30 +00:00
|
|
|
#define TRACE(fmt, ...) TRACE__(gDebugChannel, fmt, ##__VA_ARGS__)
|
|
|
|
#define WARN(fmt, ...) WARN__(gDebugChannel, fmt, ##__VA_ARGS__)
|
|
|
|
#define FIXME(fmt, ...) WARN__(gDebugChannel, fmt,## __VA_ARGS__)
|
|
|
|
#define ERR(fmt, ...) ERR__(gDebugChannel, fmt, ##__VA_ARGS__)
|
|
|
|
|
2011-07-22 08:59:27 +00:00
|
|
|
#define STUB \
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
|
|
|
|
DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
|
|
|
|
|
2011-11-06 01:47:49 +00:00
|
|
|
#define debugstr_a
|
[KERNEL32]: While working on the CMAKE branch, Amine and myself discovered a rather serious issue in kernel32 (and perhaps other libraries as well). Unlike rbuild, CMake does not allow you to export non-existant DLL functions (try it: add "poopyhead" in kernel32's exports under RBuild, and will it export "poopyhead", God knowing what that will actually link to).
As an additional feature on top of the "allow non-existing functions to be exported" "feature", because rbuild generates and links STDCALL function names without the proper decoration (vs. enforcing decoration at linking, but only removing it at export-time), this allows the definition (as an export) of a STDCALL function that is completely different from the actual function itself.
For example, the 5-parameter Foo function is normally Foo@20, while the 3-parameter Foo function woudl be Foo@12. Linking one against the other would fail (say, 2 parameters were added to Foo in a newer version). However, under RBUILD, both of these would appear as "Foo", and the linker/compiler would happilly connect the caller of Foo@3 (that has pushed 3 parameters) to the receiving side of Foo@5 (that is about to pop 5 parameters).
Even -if- decorations WERE to be applied, Foo@12 would STILL succeed, because of the first feature, which would enable the export of Foo@12 even though no such function exist.
In a further, bizare, twist of fate, the behavior of this RBUILD "feature", when the target function is not found, is to link the exported DLL TO ITSELF.
Therefore, one can see how, previously to this patch, kernel32.dll would import a dozen functions from itself (all the non-existing functions).
To really seal the deal, the behavior of exported functions used by kernel32, but that are actually forwarded to another DLL deserves a special mention.
GetLastError, for example, merely forwards to RtlGetLastWin32Error, so it is normal behavior to use a #define in the C code so that all internal calls to the function are routed correctly.
This did not happen, so instead, kernel32 tried importing/linking/exporting GetLastError, but this symbol is not found in the binary, because it is only a forwarder.
This caused kernel32 to import from itself (the behavior when an exported symbol is not found). When importing from itself, the loader would now find the _forwarded_ for GetLastError, and correctly link with ntdll.
What should be a one-liner of assembly (inline TEB access) thus became a triple-call indirection (GetLastError@0->StubLastError@0->__impGetLastError@0->__impRtlGetLastWin32Error->RtlGetLastWin32Error.
While analyzing these issues, we also realized a strange macro SetLastErrorByStatus that manually tried to perform what there already exists a function for: RtlSetLastNtStatusFromWin32Error.
And, in an exciting coda, we also realized that our Server 2003 Kernel32 exports more than a dozen Windows 95 APIs, through an auto-stub generation mechanism within winebuild, that gets linked as an object behind the scenes.
[KERNEL32]: Removed all Win95 exports, cleaned up exports.
[KERNEL32]: Fixed up set/get error macros by making them inline and/or calling the correct ntdll function.
[KERNEL32]: Removed bizare calls to Wine-internal/specific APIs from our core Win32 DLL.
[KERNEL32]: Wrote stubs for all functions which should be exported, and set the correct number of parameters for them.
[KERNEL32]: Kernel32 is smaller, loads faster, does not export Windows 95 functions, does not export non-existing functions, and does not import from itself anymore.
Note: This is one of the many failings of RBUILD the CMAKE system has helped us discover. I believe these issues are serious enough to warrant an immediate sync with trunk, but rest assured, there are many more completely broken, infinitely-regressing things that we discovered while switching to CMAKE.
svn path=/trunk/; revision=48475
2010-08-07 05:02:58 +00:00
|
|
|
#define debugstr_w
|
2013-12-22 18:10:41 +00:00
|
|
|
#define debugstr_wn
|
2011-11-06 01:47:49 +00:00
|
|
|
#define wine_dbgstr_w
|
[KERNEL32]: While working on the CMAKE branch, Amine and myself discovered a rather serious issue in kernel32 (and perhaps other libraries as well). Unlike rbuild, CMake does not allow you to export non-existant DLL functions (try it: add "poopyhead" in kernel32's exports under RBuild, and will it export "poopyhead", God knowing what that will actually link to).
As an additional feature on top of the "allow non-existing functions to be exported" "feature", because rbuild generates and links STDCALL function names without the proper decoration (vs. enforcing decoration at linking, but only removing it at export-time), this allows the definition (as an export) of a STDCALL function that is completely different from the actual function itself.
For example, the 5-parameter Foo function is normally Foo@20, while the 3-parameter Foo function woudl be Foo@12. Linking one against the other would fail (say, 2 parameters were added to Foo in a newer version). However, under RBUILD, both of these would appear as "Foo", and the linker/compiler would happilly connect the caller of Foo@3 (that has pushed 3 parameters) to the receiving side of Foo@5 (that is about to pop 5 parameters).
Even -if- decorations WERE to be applied, Foo@12 would STILL succeed, because of the first feature, which would enable the export of Foo@12 even though no such function exist.
In a further, bizare, twist of fate, the behavior of this RBUILD "feature", when the target function is not found, is to link the exported DLL TO ITSELF.
Therefore, one can see how, previously to this patch, kernel32.dll would import a dozen functions from itself (all the non-existing functions).
To really seal the deal, the behavior of exported functions used by kernel32, but that are actually forwarded to another DLL deserves a special mention.
GetLastError, for example, merely forwards to RtlGetLastWin32Error, so it is normal behavior to use a #define in the C code so that all internal calls to the function are routed correctly.
This did not happen, so instead, kernel32 tried importing/linking/exporting GetLastError, but this symbol is not found in the binary, because it is only a forwarder.
This caused kernel32 to import from itself (the behavior when an exported symbol is not found). When importing from itself, the loader would now find the _forwarded_ for GetLastError, and correctly link with ntdll.
What should be a one-liner of assembly (inline TEB access) thus became a triple-call indirection (GetLastError@0->StubLastError@0->__impGetLastError@0->__impRtlGetLastWin32Error->RtlGetLastWin32Error.
While analyzing these issues, we also realized a strange macro SetLastErrorByStatus that manually tried to perform what there already exists a function for: RtlSetLastNtStatusFromWin32Error.
And, in an exciting coda, we also realized that our Server 2003 Kernel32 exports more than a dozen Windows 95 APIs, through an auto-stub generation mechanism within winebuild, that gets linked as an object behind the scenes.
[KERNEL32]: Removed all Win95 exports, cleaned up exports.
[KERNEL32]: Fixed up set/get error macros by making them inline and/or calling the correct ntdll function.
[KERNEL32]: Removed bizare calls to Wine-internal/specific APIs from our core Win32 DLL.
[KERNEL32]: Wrote stubs for all functions which should be exported, and set the correct number of parameters for them.
[KERNEL32]: Kernel32 is smaller, loads faster, does not export Windows 95 functions, does not export non-existing functions, and does not import from itself anymore.
Note: This is one of the many failings of RBUILD the CMAKE system has helped us discover. I believe these issues are serious enough to warrant an immediate sync with trunk, but rest assured, there are many more completely broken, infinitely-regressing things that we discovered while switching to CMAKE.
svn path=/trunk/; revision=48475
2010-08-07 05:02:58 +00:00
|
|
|
#define debugstr_guid
|
|
|
|
|
|
|
|
#include "wine/unicode.h"
|
2006-06-24 18:11:57 +00:00
|
|
|
#include "baseheap.h"
|
|
|
|
|
2015-07-11 00:02:59 +00:00
|
|
|
#define MAGIC(c1,c2,c3,c4) ((c1) + ((c2)<<8) + ((c3)<<16) + ((c4)<<24))
|
2004-01-23 21:16:04 +00:00
|
|
|
|
2015-07-11 00:02:59 +00:00
|
|
|
#define MAGIC_HEAP MAGIC( 'H','E','A','P' )
|
2004-01-23 21:16:04 +00:00
|
|
|
|
2015-07-11 00:02:59 +00:00
|
|
|
#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b))
|
|
|
|
#define ROUNDDOWN(a,b) (((a)/(b))*(b))
|
2004-01-23 21:16:04 +00:00
|
|
|
|
2009-01-25 16:13:16 +00:00
|
|
|
#define ROUND_DOWN(n, align) \
|
|
|
|
(((ULONG)n) & ~((align) - 1l))
|
|
|
|
|
|
|
|
#define ROUND_UP(n, align) \
|
|
|
|
ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
|
|
|
|
|
2018-11-18 14:32:13 +00:00
|
|
|
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
|
|
|
|
|
2013-12-22 18:10:41 +00:00
|
|
|
#define __TRY _SEH2_TRY
|
|
|
|
#define __EXCEPT_PAGE_FAULT _SEH2_EXCEPT(_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION)
|
|
|
|
#define __ENDTRY _SEH2_END
|
Note, none of this code is being used/called yet.
[KERNEL32]: Implement BasepSxsCloseHandles, BasepReplaceProcessThreadTokens, BasepIsProcessAllowed, BasepCheckWebBladeHashes, BasepIsImageVersionOk which will be needed for the future CreateProcess re-implementation. These functions partly support SxS, Safer (Authz) and Application Certification features added in XP/2003. We also emulate support for Computer Server, Web Blade Server and Embedded ReactOS. The last function does correct image version checks to prevent invalid binaries from running.
[KERNEL32]: Implement BaseUpdateVDMEntry and BaseCheckForVDM using the new CSRSS messages (not implemented on the server-side yet). Stubplement BaseCheckVDM. These will be needed for future VDM-stub-support (primarly so we can run 16-bit installers).
[KERNEL32]: Implement BasepFreeAppCompatData, BasepCheckBadapp, and IsShimInfrastructureDisabled (exported as BaseIsAppcompatInfrastructureDisabled). These stub most of the required/exported application compatibility APIs, as long as someone sets DisableAppCompat in \\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatibility.
svn path=/trunk/; revision=54975
2012-01-15 14:49:49 +00:00
|
|
|
|
2005-07-12 05:00:33 +00:00
|
|
|
/* Undocumented CreateProcess flag */
|
|
|
|
#define STARTF_SHELLPRIVATE 0x400
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2008-11-03 11:27:17 +00:00
|
|
|
typedef struct _CODEPAGE_ENTRY
|
|
|
|
{
|
2013-01-16 00:16:06 +00:00
|
|
|
LIST_ENTRY Entry;
|
|
|
|
UINT CodePage;
|
|
|
|
HANDLE SectionHandle;
|
|
|
|
PBYTE SectionMapping;
|
|
|
|
CPTABLEINFO CodePageTable;
|
2008-11-03 11:27:17 +00:00
|
|
|
} CODEPAGE_ENTRY, *PCODEPAGE_ENTRY;
|
|
|
|
|
2013-01-16 00:16:06 +00:00
|
|
|
typedef struct tagLOADPARMS32
|
|
|
|
{
|
|
|
|
LPSTR lpEnvAddress;
|
|
|
|
LPSTR lpCmdLine;
|
|
|
|
WORD wMagicValue;
|
|
|
|
WORD wCmdShow;
|
|
|
|
DWORD dwReserved;
|
2011-10-16 17:05:16 +00:00
|
|
|
} LOADPARMS32;
|
|
|
|
|
2011-11-29 15:04:31 +00:00
|
|
|
typedef enum _BASE_SEARCH_PATH_TYPE
|
|
|
|
{
|
|
|
|
BaseSearchPathInvalid,
|
|
|
|
BaseSearchPathDll,
|
|
|
|
BaseSearchPathApp,
|
|
|
|
BaseSearchPathDefault,
|
|
|
|
BaseSearchPathEnv,
|
|
|
|
BaseSearchPathCurrent,
|
|
|
|
BaseSearchPathMax
|
|
|
|
} BASE_SEARCH_PATH_TYPE, *PBASE_SEARCH_PATH_TYPE;
|
2011-10-16 17:05:16 +00:00
|
|
|
|
2011-12-04 19:30:12 +00:00
|
|
|
typedef enum _BASE_CURRENT_DIR_PLACEMENT
|
|
|
|
{
|
|
|
|
BaseCurrentDirPlacementInvalid = -1,
|
|
|
|
BaseCurrentDirPlacementDefault,
|
|
|
|
BaseCurrentDirPlacementSafe,
|
|
|
|
BaseCurrentDirPlacementMax
|
|
|
|
} BASE_CURRENT_DIR_PLACEMENT;
|
|
|
|
|
2012-02-21 23:27:45 +00:00
|
|
|
typedef struct _BASEP_ACTCTX_BLOCK
|
|
|
|
{
|
|
|
|
ULONG Flags;
|
|
|
|
PVOID ActivationContext;
|
|
|
|
PVOID CompletionContext;
|
|
|
|
LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine;
|
|
|
|
} BASEP_ACTCTX_BLOCK, *PBASEP_ACTCTX_BLOCK;
|
|
|
|
|
2011-10-16 17:05:16 +00:00
|
|
|
#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
|
|
|
|
|
2011-07-25 03:28:33 +00:00
|
|
|
extern PBASE_STATIC_SERVER_DATA BaseStaticServerData;
|
|
|
|
|
2005-05-09 01:46:57 +00:00
|
|
|
typedef
|
2004-01-23 21:16:04 +00:00
|
|
|
DWORD
|
|
|
|
(*WaitForInputIdleType)(
|
|
|
|
HANDLE hProcess,
|
|
|
|
DWORD dwMilliseconds);
|
|
|
|
|
[KERNEL32]: Changes to proc.c:
- ReadProcessMemory/WriteProcessMemory only write to *lpNumberOfBytesRead/Written if user-mode passed in the parameter, as its an optional argument in Win32, but not in NT. Instead, use a local variable. This means that anyone calling ReadProcessMemory/WriteProcessMemory in ReactOS before with a NULL output argument (totally valid) was getting an error before!
- WriteProcessMemory actually returns STATUS_ACCESS_VIOLATION in a few cases, even if it's defined as a BOOL function. Code on Google shows major applications depending on this, which we weren't doing.
- Rewrite InitCommandLines to be much simpler. No normalization or copying or ANSi/OEM logic is needed.
- GetProcessAffinityMask should use the BaseStaticServerData from CSRSS instead of querying system information each time.
- GetProcessShutdownParameters and SetProcessShutdownParameters should use the LPC status code from CSRSS, not the LPC API status code.
- GetProcessWorkingSetSize now calls GetProcessWorkingSetSizeEx.
- Implement GetProcessWorkingSetSizeEx.
- SetProcessWorkingSetSize now calls SetProcessWorkingSetSizeEx.
- Implement SetProcessWorkingSetSizeEx.
- Acquire the required privilege in SetProcessWorkingSetSize(Ex).
- Fail with correct status code in SetProcessWorkingSetSize(Ex).
- GetExitCodeProcess should check if this is a VDM process and get the exit code that way.
- GetStartupInfoW should not fail if the input is NULL. It should crash.
- GetStartupInfoW was not filling out the lpReserved field, which should contain the ShellInfo buffer.
- GetStartupInfoW was always setting standard handles -- it should not do so if those are console handles.
- GetStartupInfoA was not thread-safe.
- GetStartupInfoA was assuming all Unicode->ANSI conversions will be successful.
- GetStartupInfoA was not filling out lpReserved either.
- ExitProcess was not using SEH and was not using the PEB lock.
- TerminateProcess was not setting ERROR_INVALID_HANDLE last error code.
- FatalAppExitA was not using static TEB buffer, and was always assuming success.
- FatalAppExitW was doing some sort of bizarre hack. It now raises as a hard error as it should.
- FatalExit now displays a debugger input interface on checked builds, just like Windows.
- SetPriorityClass now tries to acquire the real time privilege when needed, and handles failure to do so.
- GetProcessVersion rewritten to be cleaner and simpler.
- Annotate and reformat functions where needed.
- Rename lpfnGlobalRegisterWaitForInputIdle to UserWaitForInputIdleRoutine
- GetProcessPriorityBoost is now BOOL-safe.
- IsWow64Process now sets NT error code using only one API.
- CommandLineStringA/W -> BaseAnsiCommandLine/BaseUnicodeCommandLine.
svn path=/trunk/; revision=55092
2012-01-23 04:57:12 +00:00
|
|
|
extern WaitForInputIdleType UserWaitForInputIdleRoutine;
|
2011-10-16 17:05:16 +00:00
|
|
|
|
2014-06-09 16:48:59 +00:00
|
|
|
/* Flags for PrivCopyFileExW && BasepCopyFileExW */
|
|
|
|
#define BASEP_COPY_METADATA 0x10
|
|
|
|
#define BASEP_COPY_SACL 0x20
|
|
|
|
#define BASEP_COPY_OWNER_AND_GROUP 0x40
|
|
|
|
#define BASEP_COPY_DIRECTORY 0x80
|
|
|
|
#define BASEP_COPY_BACKUP_SEMANTICS 0x100
|
|
|
|
#define BASEP_COPY_REPLACE 0x200
|
|
|
|
#define BASEP_COPY_SKIP_DACL 0x400
|
|
|
|
#define BASEP_COPY_PUBLIC_MASK 0xF
|
|
|
|
#define BASEP_COPY_BASEP_MASK 0xFFFFFFF0
|
|
|
|
|
2015-04-21 10:55:26 +00:00
|
|
|
/* Flags for PrivMoveFileIdentityW */
|
|
|
|
#define PRIV_DELETE_ON_SUCCESS 0x1
|
|
|
|
#define PRIV_ALLOW_NON_TRACKABLE 0x2
|
|
|
|
|
2004-01-23 21:16:04 +00:00
|
|
|
/* GLOBAL VARIABLES **********************************************************/
|
|
|
|
|
|
|
|
extern BOOL bIsFileApiAnsi;
|
2004-06-26 20:07:40 +00:00
|
|
|
extern HMODULE hCurrentModule;
|
2004-01-23 21:16:04 +00:00
|
|
|
|
2011-03-29 21:48:13 +00:00
|
|
|
extern RTL_CRITICAL_SECTION BaseDllDirectoryLock;
|
2004-01-23 21:16:04 +00:00
|
|
|
|
2011-03-29 21:48:13 +00:00
|
|
|
extern UNICODE_STRING BaseDllDirectory;
|
2011-04-01 10:06:03 +00:00
|
|
|
extern UNICODE_STRING BaseDefaultPath;
|
|
|
|
extern UNICODE_STRING BaseDefaultPathAppend;
|
2011-04-06 21:49:04 +00:00
|
|
|
extern PLDR_DATA_TABLE_ENTRY BasepExeLdrEntry;
|
2004-12-09 17:28:10 +00:00
|
|
|
|
2004-12-13 13:32:24 +00:00
|
|
|
extern LPTOP_LEVEL_EXCEPTION_FILTER GlobalTopLevelExceptionFilter;
|
|
|
|
|
2011-07-20 15:54:21 +00:00
|
|
|
extern SYSTEM_BASIC_INFORMATION BaseCachedSysInfo;
|
|
|
|
|
2011-07-23 11:38:58 +00:00
|
|
|
extern BOOLEAN BaseRunningInServerProcess;
|
|
|
|
|
2004-01-23 21:16:04 +00:00
|
|
|
/* FUNCTION PROTOTYPES *******************************************************/
|
|
|
|
|
2011-08-04 22:18:01 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
BaseDllInitializeMemoryManager(VOID);
|
|
|
|
|
2004-01-23 21:16:04 +00:00
|
|
|
PTEB GetTeb(VOID);
|
|
|
|
|
2005-03-15 19:40:22 +00:00
|
|
|
PWCHAR FilenameA2W(LPCSTR NameA, BOOL alloc);
|
2008-09-13 09:21:43 +00:00
|
|
|
DWORD FilenameW2A_N(LPSTR dest, INT destlen, LPCWSTR src, INT srclen);
|
2005-05-09 01:46:57 +00:00
|
|
|
|
2005-03-15 19:40:22 +00:00
|
|
|
DWORD FilenameW2A_FitOrFail(LPSTR DestA, INT destLen, LPCWSTR SourceW, INT sourceLen);
|
|
|
|
DWORD FilenameU2A_FitOrFail(LPSTR DestA, INT destLen, PUNICODE_STRING SourceU);
|
|
|
|
|
2005-05-15 22:07:07 +00:00
|
|
|
#define HeapAlloc RtlAllocateHeap
|
2005-09-25 21:05:18 +00:00
|
|
|
#define HeapReAlloc RtlReAllocateHeap
|
2005-05-15 22:07:07 +00:00
|
|
|
#define HeapFree RtlFreeHeap
|
2013-12-22 18:10:41 +00:00
|
|
|
#define _lread(a, b, c) (long)(_hread(a, b, (long)c))
|
2005-03-15 19:40:22 +00:00
|
|
|
|
2011-07-23 11:05:00 +00:00
|
|
|
PLARGE_INTEGER
|
|
|
|
WINAPI
|
|
|
|
BaseFormatTimeOut(OUT PLARGE_INTEGER Timeout,
|
|
|
|
IN DWORD dwMilliseconds);
|
|
|
|
|
2005-07-12 05:00:33 +00:00
|
|
|
POBJECT_ATTRIBUTES
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2011-11-03 00:30:44 +00:00
|
|
|
BaseFormatObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes,
|
2005-07-12 05:00:33 +00:00
|
|
|
IN PSECURITY_ATTRIBUTES SecurityAttributes OPTIONAL,
|
|
|
|
IN PUNICODE_STRING ObjectName);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2005-07-12 05:00:33 +00:00
|
|
|
NTSTATUS
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2016-05-26 02:44:25 +00:00
|
|
|
BaseCreateStack(
|
|
|
|
_In_ HANDLE hProcess,
|
|
|
|
_In_opt_ SIZE_T StackCommit,
|
|
|
|
_In_opt_ SIZE_T StackReserve,
|
|
|
|
_Out_ PINITIAL_TEB InitialTeb);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
WINAPI
|
|
|
|
BaseFreeThreadStack(
|
|
|
|
_In_ HANDLE hProcess,
|
|
|
|
_In_ PINITIAL_TEB InitialTeb);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2005-07-12 05:00:33 +00:00
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2011-11-03 00:30:44 +00:00
|
|
|
BaseInitializeContext(IN PCONTEXT Context,
|
2005-07-12 05:00:33 +00:00
|
|
|
IN PVOID Parameter,
|
|
|
|
IN PVOID StartAddress,
|
|
|
|
IN PVOID StackAddress,
|
|
|
|
IN ULONG ContextType);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2005-07-12 05:00:33 +00:00
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2007-01-26 07:22:19 +00:00
|
|
|
BaseThreadStartupThunk(VOID);
|
2005-07-12 05:00:33 +00:00
|
|
|
|
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2007-01-26 07:22:19 +00:00
|
|
|
BaseProcessStartThunk(VOID);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2012-02-21 23:27:45 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
BasepFreeActivationContextActivationBlock(
|
|
|
|
IN PBASEP_ACTCTX_BLOCK ActivationBlock
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
BasepAllocateActivationContextActivationBlock(
|
|
|
|
IN DWORD Flags,
|
|
|
|
IN PVOID CompletionRoutine,
|
|
|
|
IN PVOID CompletionContext,
|
|
|
|
OUT PBASEP_ACTCTX_BLOCK *ActivationBlock
|
|
|
|
);
|
|
|
|
|
2016-01-07 12:09:03 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
BasepProbeForDllManifest(
|
|
|
|
IN PVOID DllHandle,
|
|
|
|
IN PCWSTR FullDllName,
|
|
|
|
OUT PVOID *ActCtx
|
|
|
|
);
|
|
|
|
|
2022-04-17 23:20:22 +00:00
|
|
|
DECLSPEC_NORETURN
|
2005-07-12 05:00:33 +00:00
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2022-04-17 23:20:22 +00:00
|
|
|
BaseThreadStartup(
|
|
|
|
_In_ LPTHREAD_START_ROUTINE lpStartAddress,
|
|
|
|
_In_ LPVOID lpParameter);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2022-04-17 23:20:22 +00:00
|
|
|
DECLSPEC_NORETURN
|
2005-07-12 05:00:33 +00:00
|
|
|
VOID
|
|
|
|
WINAPI
|
|
|
|
BaseFiberStartup(VOID);
|
|
|
|
|
2022-04-17 23:20:22 +00:00
|
|
|
typedef DWORD (WINAPI *PPROCESS_START_ROUTINE)(VOID);
|
2005-07-12 05:00:33 +00:00
|
|
|
|
2022-04-17 23:20:22 +00:00
|
|
|
DECLSPEC_NORETURN
|
2005-07-12 05:00:33 +00:00
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2022-04-17 23:20:22 +00:00
|
|
|
BaseProcessStartup(
|
|
|
|
_In_ PPROCESS_START_ROUTINE lpStartAddress);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2011-11-03 00:30:44 +00:00
|
|
|
PVOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2011-11-03 00:30:44 +00:00
|
|
|
BasepIsRealtimeAllowed(IN BOOLEAN Keep);
|
2005-07-12 05:00:33 +00:00
|
|
|
|
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2005-07-12 05:00:33 +00:00
|
|
|
BasepAnsiStringToHeapUnicodeString(IN LPCSTR AnsiString,
|
2005-07-29 21:55:09 +00:00
|
|
|
OUT LPWSTR* UnicodeString);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2005-07-12 05:00:33 +00:00
|
|
|
PUNICODE_STRING
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2011-02-19 17:00:08 +00:00
|
|
|
Basep8BitStringToStaticUnicodeString(IN LPCSTR AnsiString);
|
2005-07-12 05:00:33 +00:00
|
|
|
|
2011-02-20 19:40:15 +00:00
|
|
|
BOOLEAN
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2011-02-20 19:40:15 +00:00
|
|
|
Basep8BitStringToDynamicUnicodeString(OUT PUNICODE_STRING UnicodeString,
|
|
|
|
IN LPCSTR String);
|
2005-07-29 21:55:09 +00:00
|
|
|
|
2006-03-04 17:27:40 +00:00
|
|
|
typedef NTSTATUS (NTAPI *PRTL_CONVERT_STRING)(IN PUNICODE_STRING UnicodeString,
|
|
|
|
IN PANSI_STRING AnsiString,
|
|
|
|
IN BOOLEAN AllocateMemory);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
|
|
|
typedef ULONG (NTAPI *PRTL_COUNT_STRING)(IN PUNICODE_STRING UnicodeString);
|
|
|
|
|
|
|
|
typedef NTSTATUS (NTAPI *PRTL_CONVERT_STRINGA)(IN PANSI_STRING AnsiString,
|
|
|
|
IN PCUNICODE_STRING UnicodeString,
|
|
|
|
IN BOOLEAN AllocateMemory);
|
|
|
|
|
|
|
|
typedef ULONG (NTAPI *PRTL_COUNT_STRINGA)(IN PANSI_STRING UnicodeString);
|
|
|
|
|
2011-11-06 04:13:21 +00:00
|
|
|
ULONG
|
|
|
|
NTAPI
|
|
|
|
BasepUnicodeStringToAnsiSize(IN PUNICODE_STRING String);
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
NTAPI
|
|
|
|
BasepAnsiStringToUnicodeSize(IN PANSI_STRING String);
|
2011-11-06 01:47:49 +00:00
|
|
|
|
2005-07-29 21:55:09 +00:00
|
|
|
extern PRTL_CONVERT_STRING Basep8BitStringToUnicodeString;
|
2011-11-06 01:47:49 +00:00
|
|
|
extern PRTL_CONVERT_STRINGA BasepUnicodeStringTo8BitString;
|
|
|
|
extern PRTL_COUNT_STRING BasepUnicodeStringTo8BitSize;
|
|
|
|
extern PRTL_COUNT_STRINGA Basep8BitStringToUnicodeSize;
|
|
|
|
|
2011-11-07 07:41:52 +00:00
|
|
|
extern UNICODE_STRING BaseWindowsDirectory, BaseWindowsSystemDirectory;
|
2011-11-03 00:30:44 +00:00
|
|
|
extern HANDLE BaseNamedObjectDirectory;
|
|
|
|
|
2011-11-03 07:00:48 +00:00
|
|
|
HANDLE
|
2011-11-03 00:30:44 +00:00
|
|
|
WINAPI
|
|
|
|
BaseGetNamedObjectDirectory(VOID);
|
2005-07-12 05:00:33 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2005-07-12 05:00:33 +00:00
|
|
|
BasepMapFile(IN LPCWSTR lpApplicationName,
|
|
|
|
OUT PHANDLE hSection,
|
|
|
|
IN PUNICODE_STRING ApplicationName);
|
|
|
|
|
2008-11-03 11:27:17 +00:00
|
|
|
PCODEPAGE_ENTRY FASTCALL
|
|
|
|
IntGetCodePageEntry(UINT CodePage);
|
|
|
|
|
2009-07-17 13:24:07 +00:00
|
|
|
LPWSTR
|
2011-12-04 19:30:12 +00:00
|
|
|
WINAPI
|
|
|
|
BaseComputeProcessDllPath(
|
|
|
|
IN LPWSTR FullPath,
|
|
|
|
IN PVOID Environment
|
|
|
|
);
|
2010-05-06 10:50:26 +00:00
|
|
|
|
Note, none of this code is being used/called yet.
[KERNEL32]: Implement BasepSxsCloseHandles, BasepReplaceProcessThreadTokens, BasepIsProcessAllowed, BasepCheckWebBladeHashes, BasepIsImageVersionOk which will be needed for the future CreateProcess re-implementation. These functions partly support SxS, Safer (Authz) and Application Certification features added in XP/2003. We also emulate support for Computer Server, Web Blade Server and Embedded ReactOS. The last function does correct image version checks to prevent invalid binaries from running.
[KERNEL32]: Implement BaseUpdateVDMEntry and BaseCheckForVDM using the new CSRSS messages (not implemented on the server-side yet). Stubplement BaseCheckVDM. These will be needed for future VDM-stub-support (primarly so we can run 16-bit installers).
[KERNEL32]: Implement BasepFreeAppCompatData, BasepCheckBadapp, and IsShimInfrastructureDisabled (exported as BaseIsAppcompatInfrastructureDisabled). These stub most of the required/exported application compatibility APIs, as long as someone sets DisableAppCompat in \\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatibility.
svn path=/trunk/; revision=54975
2012-01-15 14:49:49 +00:00
|
|
|
LPWSTR
|
|
|
|
WINAPI
|
|
|
|
BaseComputeProcessExePath(
|
|
|
|
IN LPWSTR FullPath
|
|
|
|
);
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
WINAPI
|
|
|
|
BaseIsDosApplication(
|
|
|
|
IN PUNICODE_STRING PathName,
|
|
|
|
IN NTSTATUS Status
|
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
WINAPI
|
|
|
|
BasepCheckBadapp(
|
|
|
|
IN HANDLE FileHandle,
|
|
|
|
IN PWCHAR ApplicationName,
|
|
|
|
IN PWCHAR Environment,
|
|
|
|
IN USHORT ExeType,
|
|
|
|
IN PVOID* SdbQueryAppCompatData,
|
|
|
|
IN PULONG SdbQueryAppCompatDataSize,
|
|
|
|
IN PVOID* SxsData,
|
|
|
|
IN PULONG SxsDataSize,
|
|
|
|
OUT PULONG FusionFlags
|
|
|
|
);
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
WINAPI
|
|
|
|
IsShimInfrastructureDisabled(
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2010-05-06 10:50:26 +00:00
|
|
|
VOID
|
|
|
|
WINAPI
|
|
|
|
InitCommandLines(VOID);
|
2011-02-19 17:00:08 +00:00
|
|
|
|
2015-02-20 07:03:00 +00:00
|
|
|
DWORD
|
2011-02-19 17:00:08 +00:00
|
|
|
WINAPI
|
|
|
|
BaseSetLastNTError(IN NTSTATUS Status);
|
2011-02-20 19:49:02 +00:00
|
|
|
|
2011-10-16 17:05:16 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
BasepLocateExeLdrEntry(IN PLDR_DATA_TABLE_ENTRY Entry,
|
|
|
|
IN PVOID Context,
|
|
|
|
OUT BOOLEAN *StopEnumeration);
|
|
|
|
|
Note, none of this code is being used/called yet.
[KERNEL32]: Implement BasepSxsCloseHandles, BasepReplaceProcessThreadTokens, BasepIsProcessAllowed, BasepCheckWebBladeHashes, BasepIsImageVersionOk which will be needed for the future CreateProcess re-implementation. These functions partly support SxS, Safer (Authz) and Application Certification features added in XP/2003. We also emulate support for Computer Server, Web Blade Server and Embedded ReactOS. The last function does correct image version checks to prevent invalid binaries from running.
[KERNEL32]: Implement BaseUpdateVDMEntry and BaseCheckForVDM using the new CSRSS messages (not implemented on the server-side yet). Stubplement BaseCheckVDM. These will be needed for future VDM-stub-support (primarly so we can run 16-bit installers).
[KERNEL32]: Implement BasepFreeAppCompatData, BasepCheckBadapp, and IsShimInfrastructureDisabled (exported as BaseIsAppcompatInfrastructureDisabled). These stub most of the required/exported application compatibility APIs, as long as someone sets DisableAppCompat in \\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatibility.
svn path=/trunk/; revision=54975
2012-01-15 14:49:49 +00:00
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PBASEP_APPCERT_PLUGIN_FUNC)(
|
[KERNEL32]: Complete rewrite of CreateProcessInternalW based on Server 2003, instead of the original version that I wrote based on Windows 2000. This new version adds the right CSRSS support for VDM and Wow32, stubs the upcoming support for SxS, uses the new NtCreateProcessEx functionality, adds checks for SDB/Shim/AppCompat, adds checks for SRP (the old AppLocker), adds support for image file execution options, such as large pages and the debugger key, adds licensing checks, adds better path handling using the path APIs that Thomas, Hermes, and Myself re-wrote/improved in Rtl/NTDLL, and a whole lot more. Tested with a bunch of launches, downloads, and apps, and no immediate regressions were seen, but this is 3500 lines of code and nothing is perfect. Please file Jira issues as they come up -- I will maintain & fix this. Will also ask Hermes to start working on the VDM/WoW32 paths for the new NTVDM work that's happening, and I will start looking at SxS.
svn path=/trunk/; revision=59637
2013-08-04 16:58:54 +00:00
|
|
|
IN LPWSTR ApplicationName,
|
Note, none of this code is being used/called yet.
[KERNEL32]: Implement BasepSxsCloseHandles, BasepReplaceProcessThreadTokens, BasepIsProcessAllowed, BasepCheckWebBladeHashes, BasepIsImageVersionOk which will be needed for the future CreateProcess re-implementation. These functions partly support SxS, Safer (Authz) and Application Certification features added in XP/2003. We also emulate support for Computer Server, Web Blade Server and Embedded ReactOS. The last function does correct image version checks to prevent invalid binaries from running.
[KERNEL32]: Implement BaseUpdateVDMEntry and BaseCheckForVDM using the new CSRSS messages (not implemented on the server-side yet). Stubplement BaseCheckVDM. These will be needed for future VDM-stub-support (primarly so we can run 16-bit installers).
[KERNEL32]: Implement BasepFreeAppCompatData, BasepCheckBadapp, and IsShimInfrastructureDisabled (exported as BaseIsAppcompatInfrastructureDisabled). These stub most of the required/exported application compatibility APIs, as long as someone sets DisableAppCompat in \\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatibility.
svn path=/trunk/; revision=54975
2012-01-15 14:49:49 +00:00
|
|
|
IN ULONG CertFlag
|
|
|
|
);
|
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PBASEP_APPCERT_EMBEDDED_FUNC)(
|
[KERNEL32]: Complete rewrite of CreateProcessInternalW based on Server 2003, instead of the original version that I wrote based on Windows 2000. This new version adds the right CSRSS support for VDM and Wow32, stubs the upcoming support for SxS, uses the new NtCreateProcessEx functionality, adds checks for SDB/Shim/AppCompat, adds checks for SRP (the old AppLocker), adds support for image file execution options, such as large pages and the debugger key, adds licensing checks, adds better path handling using the path APIs that Thomas, Hermes, and Myself re-wrote/improved in Rtl/NTDLL, and a whole lot more. Tested with a bunch of launches, downloads, and apps, and no immediate regressions were seen, but this is 3500 lines of code and nothing is perfect. Please file Jira issues as they come up -- I will maintain & fix this. Will also ask Hermes to start working on the VDM/WoW32 paths for the new NTVDM work that's happening, and I will start looking at SxS.
svn path=/trunk/; revision=59637
2013-08-04 16:58:54 +00:00
|
|
|
IN LPWSTR ApplicationName
|
Note, none of this code is being used/called yet.
[KERNEL32]: Implement BasepSxsCloseHandles, BasepReplaceProcessThreadTokens, BasepIsProcessAllowed, BasepCheckWebBladeHashes, BasepIsImageVersionOk which will be needed for the future CreateProcess re-implementation. These functions partly support SxS, Safer (Authz) and Application Certification features added in XP/2003. We also emulate support for Computer Server, Web Blade Server and Embedded ReactOS. The last function does correct image version checks to prevent invalid binaries from running.
[KERNEL32]: Implement BaseUpdateVDMEntry and BaseCheckForVDM using the new CSRSS messages (not implemented on the server-side yet). Stubplement BaseCheckVDM. These will be needed for future VDM-stub-support (primarly so we can run 16-bit installers).
[KERNEL32]: Implement BasepFreeAppCompatData, BasepCheckBadapp, and IsShimInfrastructureDisabled (exported as BaseIsAppcompatInfrastructureDisabled). These stub most of the required/exported application compatibility APIs, as long as someone sets DisableAppCompat in \\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatibility.
svn path=/trunk/; revision=54975
2012-01-15 14:49:49 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PSAFER_REPLACE_PROCESS_THREAD_TOKENS)(
|
|
|
|
IN HANDLE Token,
|
|
|
|
IN HANDLE Process,
|
|
|
|
IN HANDLE Thread
|
|
|
|
);
|
|
|
|
|
|
|
|
typedef struct _BASEP_APPCERT_ENTRY
|
|
|
|
{
|
|
|
|
LIST_ENTRY Entry;
|
|
|
|
UNICODE_STRING Name;
|
|
|
|
PBASEP_APPCERT_PLUGIN_FUNC fPluginCertFunc;
|
|
|
|
} BASEP_APPCERT_ENTRY, *PBASEP_APPCERT_ENTRY;
|
|
|
|
|
|
|
|
typedef struct _BASE_MSG_SXS_HANDLES
|
|
|
|
{
|
|
|
|
HANDLE File;
|
|
|
|
HANDLE Process;
|
|
|
|
HANDLE Section;
|
|
|
|
LARGE_INTEGER ViewBase;
|
|
|
|
} BASE_MSG_SXS_HANDLES, *PBASE_MSG_SXS_HANDLES;
|
|
|
|
|
2012-01-16 21:27:50 +00:00
|
|
|
typedef struct _SXS_WIN32_NT_PATH_PAIR
|
|
|
|
{
|
|
|
|
PUNICODE_STRING Win32;
|
|
|
|
PUNICODE_STRING Nt;
|
|
|
|
} SXS_WIN32_NT_PATH_PAIR, *PSXS_WIN32_NT_PATH_PAIR;
|
|
|
|
|
|
|
|
typedef struct _SXS_OVERRIDE_MANIFEST
|
|
|
|
{
|
|
|
|
PCWCH Name;
|
|
|
|
PVOID Address;
|
|
|
|
ULONG Size;
|
|
|
|
} SXS_OVERRIDE_MANIFEST, *PSXS_OVERRIDE_MANIFEST;
|
|
|
|
|
Note, none of this code is being used/called yet.
[KERNEL32]: Implement BasepSxsCloseHandles, BasepReplaceProcessThreadTokens, BasepIsProcessAllowed, BasepCheckWebBladeHashes, BasepIsImageVersionOk which will be needed for the future CreateProcess re-implementation. These functions partly support SxS, Safer (Authz) and Application Certification features added in XP/2003. We also emulate support for Computer Server, Web Blade Server and Embedded ReactOS. The last function does correct image version checks to prevent invalid binaries from running.
[KERNEL32]: Implement BaseUpdateVDMEntry and BaseCheckForVDM using the new CSRSS messages (not implemented on the server-side yet). Stubplement BaseCheckVDM. These will be needed for future VDM-stub-support (primarly so we can run 16-bit installers).
[KERNEL32]: Implement BasepFreeAppCompatData, BasepCheckBadapp, and IsShimInfrastructureDisabled (exported as BaseIsAppcompatInfrastructureDisabled). These stub most of the required/exported application compatibility APIs, as long as someone sets DisableAppCompat in \\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatibility.
svn path=/trunk/; revision=54975
2012-01-15 14:49:49 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
BasepConfigureAppCertDlls(
|
|
|
|
IN PWSTR ValueName,
|
|
|
|
IN ULONG ValueType,
|
|
|
|
IN PVOID ValueData,
|
|
|
|
IN ULONG ValueLength,
|
|
|
|
IN PVOID Context,
|
|
|
|
IN PVOID EntryContext
|
|
|
|
);
|
|
|
|
|
|
|
|
extern LIST_ENTRY BasepAppCertDllsList;
|
|
|
|
extern RTL_CRITICAL_SECTION gcsAppCert;
|
|
|
|
|
2012-01-01 17:19:31 +00:00
|
|
|
VOID
|
|
|
|
WINAPI
|
Note, none of this code is being used/called yet.
[KERNEL32]: Implement BasepSxsCloseHandles, BasepReplaceProcessThreadTokens, BasepIsProcessAllowed, BasepCheckWebBladeHashes, BasepIsImageVersionOk which will be needed for the future CreateProcess re-implementation. These functions partly support SxS, Safer (Authz) and Application Certification features added in XP/2003. We also emulate support for Computer Server, Web Blade Server and Embedded ReactOS. The last function does correct image version checks to prevent invalid binaries from running.
[KERNEL32]: Implement BaseUpdateVDMEntry and BaseCheckForVDM using the new CSRSS messages (not implemented on the server-side yet). Stubplement BaseCheckVDM. These will be needed for future VDM-stub-support (primarly so we can run 16-bit installers).
[KERNEL32]: Implement BasepFreeAppCompatData, BasepCheckBadapp, and IsShimInfrastructureDisabled (exported as BaseIsAppcompatInfrastructureDisabled). These stub most of the required/exported application compatibility APIs, as long as someone sets DisableAppCompat in \\Registry\\MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\AppCompatibility.
svn path=/trunk/; revision=54975
2012-01-15 14:49:49 +00:00
|
|
|
BaseMarkFileForDelete(
|
|
|
|
IN HANDLE FileHandle,
|
|
|
|
IN ULONG FileAttributes
|
|
|
|
);
|
|
|
|
|
2014-06-09 16:48:59 +00:00
|
|
|
BOOL
|
|
|
|
BasepCopyFileExW(
|
|
|
|
IN LPCWSTR lpExistingFileName,
|
|
|
|
IN LPCWSTR lpNewFileName,
|
|
|
|
IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL,
|
|
|
|
IN LPVOID lpData OPTIONAL,
|
|
|
|
IN LPBOOL pbCancel OPTIONAL,
|
|
|
|
IN DWORD dwCopyFlags,
|
|
|
|
IN DWORD dwBasepFlags,
|
|
|
|
OUT LPHANDLE lpExistingHandle,
|
|
|
|
OUT LPHANDLE lpNewHandle
|
|
|
|
);
|
[KERNEL32]: Complete rewrite of CreateProcessInternalW based on Server 2003, instead of the original version that I wrote based on Windows 2000. This new version adds the right CSRSS support for VDM and Wow32, stubs the upcoming support for SxS, uses the new NtCreateProcessEx functionality, adds checks for SDB/Shim/AppCompat, adds checks for SRP (the old AppLocker), adds support for image file execution options, such as large pages and the debugger key, adds licensing checks, adds better path handling using the path APIs that Thomas, Hermes, and Myself re-wrote/improved in Rtl/NTDLL, and a whole lot more. Tested with a bunch of launches, downloads, and apps, and no immediate regressions were seen, but this is 3500 lines of code and nothing is perfect. Please file Jira issues as they come up -- I will maintain & fix this. Will also ask Hermes to start working on the VDM/WoW32 paths for the new NTVDM work that's happening, and I will start looking at SxS.
svn path=/trunk/; revision=59637
2013-08-04 16:58:54 +00:00
|
|
|
|
2017-10-03 06:19:12 +00:00
|
|
|
BOOL
|
|
|
|
BasepGetVolumeNameForVolumeMountPoint(
|
|
|
|
IN LPCWSTR lpszMountPoint,
|
|
|
|
OUT LPWSTR lpszVolumeName,
|
|
|
|
IN DWORD cchBufferLength,
|
|
|
|
OUT LPBOOL IsAMountPoint
|
|
|
|
);
|
|
|
|
|
2017-10-05 21:41:26 +00:00
|
|
|
BOOL
|
|
|
|
BasepGetVolumeNameFromReparsePoint(
|
|
|
|
IN LPCWSTR lpszMountPoint,
|
|
|
|
OUT LPWSTR lpszVolumeName,
|
|
|
|
IN DWORD cchBufferLength,
|
|
|
|
OUT LPBOOL IsAMountPoint
|
|
|
|
);
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
IsThisARootDirectory(
|
|
|
|
IN HANDLE VolumeHandle,
|
|
|
|
IN PUNICODE_STRING NtPathName
|
|
|
|
);
|
|
|
|
|
2012-01-16 21:27:50 +00:00
|
|
|
/* FIXME: This is EXPORTED! It should go in an external kernel32.h header */
|
|
|
|
VOID
|
|
|
|
WINAPI
|
|
|
|
BasepFreeAppCompatData(
|
|
|
|
IN PVOID AppCompatData,
|
|
|
|
IN PVOID AppCompatSxsData
|
|
|
|
);
|
[KERNEL32]: Complete rewrite of CreateProcessInternalW based on Server 2003, instead of the original version that I wrote based on Windows 2000. This new version adds the right CSRSS support for VDM and Wow32, stubs the upcoming support for SxS, uses the new NtCreateProcessEx functionality, adds checks for SDB/Shim/AppCompat, adds checks for SRP (the old AppLocker), adds support for image file execution options, such as large pages and the debugger key, adds licensing checks, adds better path handling using the path APIs that Thomas, Hermes, and Myself re-wrote/improved in Rtl/NTDLL, and a whole lot more. Tested with a bunch of launches, downloads, and apps, and no immediate regressions were seen, but this is 3500 lines of code and nothing is perfect. Please file Jira issues as they come up -- I will maintain & fix this. Will also ask Hermes to start working on the VDM/WoW32 paths for the new NTVDM work that's happening, and I will start looking at SxS.
svn path=/trunk/; revision=59637
2013-08-04 16:58:54 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
WINAPI
|
|
|
|
BasepCheckWinSaferRestrictions(
|
|
|
|
IN HANDLE UserToken,
|
|
|
|
IN LPWSTR ApplicationName,
|
|
|
|
IN HANDLE FileHandle,
|
|
|
|
OUT PBOOLEAN InJob,
|
|
|
|
OUT PHANDLE NewToken,
|
|
|
|
OUT PHANDLE JobHandle
|
|
|
|
);
|