Slowly working my way through adding UNIMPLEMENTED skeletons

Rtl* functions can be passed-through to host - as soon as headers are
defined...
This commit is contained in:
PatrickvL 2016-11-16 01:43:10 +01:00
parent 456c5b1c1f
commit 5640d74248
7 changed files with 38 additions and 8 deletions

View File

@ -27,12 +27,21 @@ XBSYSAPI EXPORTNUM(260) NTSTATUS NTAPI RtlAnsiStringToUnicodeString
// ****************************************************************** // ******************************************************************
XBSYSAPI EXPORTNUM(261) NTSTATUS NTAPI RtlAppendStringToString XBSYSAPI EXPORTNUM(261) NTSTATUS NTAPI RtlAppendStringToString
( (
IN PSTRING Destination, IN OUT PSTRING Destination,
IN PSTRING Source IN PSTRING Source
); );
XBSYSAPI VOID *RtlAppendUnicodeStringToString; XBSYSAPI EXPORTNUM(262) NTSTATUS NTAPI RtlAppendUnicodeStringToString
XBSYSAPI VOID *RtlAppendUnicodeToString; (
IN OUT PUNICODE_STRING Destination,
IN PUNICODE_STRING Source
);
XBSYSAPI EXPORTNUM(263) NTSTATUS NTAPI RtlAppendUnicodeToString
(
IN OUT PUNICODE_STRING Destination,
IN LPCWSTR Source
);
// ****************************************************************** // ******************************************************************
// * RtlAssert // * RtlAssert

View File

@ -54,7 +54,7 @@ XBSYSAPI EXPORTNUM(4) VOID NTAPI AvSetSavedDataAddress
// ****************************************************************** // ******************************************************************
XBSYSAPI EXPORTNUM(35) DWORD NTAPI FscGetCacheSize(); XBSYSAPI EXPORTNUM(35) DWORD NTAPI FscGetCacheSize();
XBSYSAPI VOID *FscInvalidateIdleBlocks; XBSYSAPI EXPORTNUM(36) VOID NTAPI FscInvalidateIdleBlocks();
// ****************************************************************** // ******************************************************************
// * FscSetCacheSize // * FscSetCacheSize

View File

@ -112,6 +112,8 @@ typedef HANDLE *PHANDLE;
typedef CHAR *PCHAR, *LPCH, *PCH; typedef CHAR *PCHAR, *LPCH, *PCH;
typedef CONST CHAR *LPCCH, *PCCH; typedef CONST CHAR *LPCCH, *PCCH;
typedef /*_Null_terminated_*/ CONST WCHAR *LPCWSTR, *PCWSTR;
// ****************************************************************** // ******************************************************************
// * LPSECURITY_ATTRIBUTES // * LPSECURITY_ATTRIBUTES

View File

@ -58,6 +58,14 @@ XBSYSAPI EXPORTNUM(35) xboxkrnl::DWORD NTAPI xboxkrnl::FscGetCacheSize()
return 64 * 1024; return 64 * 1024;
} }
XBSYSAPI EXPORTNUM(36) VOID NTAPI xboxkrnl::FscInvalidateIdleBlocks()
{
LOG_FUNC();
UNIMPLEMENTED();
}
// ****************************************************************** // ******************************************************************
// * 0x0025 - FscSetCacheSize // * 0x0025 - FscSetCacheSize
// ****************************************************************** // ******************************************************************

View File

@ -52,6 +52,7 @@ static HMODULE hNtDll = GetModuleHandle("ntdll");
NtDll::FPTR_RtlInitAnsiString NtDll::RtlInitAnsiString = (NtDll::FPTR_RtlInitAnsiString)GetProcAddress(hNtDll, "RtlInitAnsiString"); NtDll::FPTR_RtlInitAnsiString NtDll::RtlInitAnsiString = (NtDll::FPTR_RtlInitAnsiString)GetProcAddress(hNtDll, "RtlInitAnsiString");
NtDll::FPTR_RtlInitUnicodeString NtDll::RtlInitUnicodeString = (NtDll::FPTR_RtlInitUnicodeString)GetProcAddress(hNtDll, "RtlInitUnicodeString"); NtDll::FPTR_RtlInitUnicodeString NtDll::RtlInitUnicodeString = (NtDll::FPTR_RtlInitUnicodeString)GetProcAddress(hNtDll, "RtlInitUnicodeString");
NtDll::FPTR_RtlAnsiStringToUnicodeString NtDll::RtlAnsiStringToUnicodeString = (NtDll::FPTR_RtlAnsiStringToUnicodeString)GetProcAddress(hNtDll, "RtlAnsiStringToUnicodeString"); NtDll::FPTR_RtlAnsiStringToUnicodeString NtDll::RtlAnsiStringToUnicodeString = (NtDll::FPTR_RtlAnsiStringToUnicodeString)GetProcAddress(hNtDll, "RtlAnsiStringToUnicodeString");
NtDll::FPTR_RtlAppendStringToString NtDll::RtlAppendStringToString = (NtDll::FPTR_RtlAppendStringToString)GetProcAddress(hNtDll, "RtlAppendStringToString");
NtDll::FPTR_RtlUnicodeStringToAnsiString NtDll::RtlUnicodeStringToAnsiString = (NtDll::FPTR_RtlUnicodeStringToAnsiString)GetProcAddress(hNtDll, "RtlUnicodeStringToAnsiString"); NtDll::FPTR_RtlUnicodeStringToAnsiString NtDll::RtlUnicodeStringToAnsiString = (NtDll::FPTR_RtlUnicodeStringToAnsiString)GetProcAddress(hNtDll, "RtlUnicodeStringToAnsiString");
NtDll::FPTR_RtlFreeAnsiString NtDll::RtlFreeAnsiString = (NtDll::FPTR_RtlFreeAnsiString)GetProcAddress(hNtDll, "RtlFreeAnsiString"); NtDll::FPTR_RtlFreeAnsiString NtDll::RtlFreeAnsiString = (NtDll::FPTR_RtlFreeAnsiString)GetProcAddress(hNtDll, "RtlFreeAnsiString");
NtDll::FPTR_RtlNtStatusToDosError NtDll::RtlNtStatusToDosError = (NtDll::FPTR_RtlNtStatusToDosError)GetProcAddress(hNtDll, "RtlNtStatusToDosError"); NtDll::FPTR_RtlNtStatusToDosError NtDll::RtlNtStatusToDosError = (NtDll::FPTR_RtlNtStatusToDosError)GetProcAddress(hNtDll, "RtlNtStatusToDosError");

View File

@ -695,6 +695,15 @@ typedef NTSTATUS (NTAPI *FPTR_RtlAnsiStringToUnicodeString)
IN BOOLEAN AllocateDestinationString IN BOOLEAN AllocateDestinationString
); );
// ******************************************************************
// * RtlAppendStringToString
// ******************************************************************
typedef NTSTATUS(NTAPI *FPTR_RtlAppendStringToString)
(
IN OUT PSTRING Destination,
IN PSTRING Source
);
// ****************************************************************** // ******************************************************************
// * RtlUnicodeStringToAnsiString // * RtlUnicodeStringToAnsiString
// ****************************************************************** // ******************************************************************
@ -1137,6 +1146,7 @@ typedef PVOID (NTAPI *FPTR_RtlDestroyHeap)
extern FPTR_RtlInitAnsiString RtlInitAnsiString; extern FPTR_RtlInitAnsiString RtlInitAnsiString;
extern FPTR_RtlInitUnicodeString RtlInitUnicodeString; extern FPTR_RtlInitUnicodeString RtlInitUnicodeString;
extern FPTR_RtlAnsiStringToUnicodeString RtlAnsiStringToUnicodeString; extern FPTR_RtlAnsiStringToUnicodeString RtlAnsiStringToUnicodeString;
extern FPTR_RtlAppendStringToString RtlAppendStringToString;
extern FPTR_RtlUnicodeStringToAnsiString RtlUnicodeStringToAnsiString; extern FPTR_RtlUnicodeStringToAnsiString RtlUnicodeStringToAnsiString;
extern FPTR_RtlFreeAnsiString RtlFreeAnsiString; extern FPTR_RtlFreeAnsiString RtlFreeAnsiString;
extern FPTR_RtlNtStatusToDosError RtlNtStatusToDosError; extern FPTR_RtlNtStatusToDosError RtlNtStatusToDosError;

View File

@ -96,7 +96,7 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[379] =
(uint32)PANIC(0x0021), // 0x0021 (33) ExfInterlockedInsertTailList (uint32)PANIC(0x0021), // 0x0021 (33) ExfInterlockedInsertTailList
(uint32)PANIC(0x0022), // 0x0022 (34) ExfInterlockedRemoveHeadList (uint32)PANIC(0x0022), // 0x0022 (34) ExfInterlockedRemoveHeadList
(uint32)FUNC(&xboxkrnl::FscGetCacheSize), // 0x0023 (35) (uint32)FUNC(&xboxkrnl::FscGetCacheSize), // 0x0023 (35)
(uint32)PANIC(0x0024), // 0x0024 (36) FscInvalidateIdleBlocks (uint32)FUNC(&xboxkrnl::FscInvalidateIdleBlocks), // 0x0024 (36)
(uint32)FUNC(&xboxkrnl::FscSetCacheSize), // 0x0025 (37) (uint32)FUNC(&xboxkrnl::FscSetCacheSize), // 0x0025 (37)
(uint32)PANIC(0x0026), // 0x0026 (38) HalClearSoftwareInterrupt (uint32)PANIC(0x0026), // 0x0026 (38) HalClearSoftwareInterrupt
(uint32)PANIC(0x0027), // 0x0027 (39) HalDisableSystemInterrupt (uint32)PANIC(0x0027), // 0x0027 (39) HalDisableSystemInterrupt
@ -321,9 +321,9 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[379] =
(uint32)FUNC(&xboxkrnl::PsTerminateSystemThread), // 0x0102 (258) (uint32)FUNC(&xboxkrnl::PsTerminateSystemThread), // 0x0102 (258)
(uint32)PANIC(0x0103), // 0x0103 (259) PsThreadObjectType (uint32)PANIC(0x0103), // 0x0103 (259) PsThreadObjectType
(uint32)FUNC(&xboxkrnl::RtlAnsiStringToUnicodeString), // 0x0104 (260) (uint32)FUNC(&xboxkrnl::RtlAnsiStringToUnicodeString), // 0x0104 (260)
(uint32)PANIC(0x0105), // 0x0105 (261) RtlAppendStringToString (uint32)FUNC(&xboxkrnl::RtlAppendStringToString), // 0x0105 (261)
(uint32)PANIC(0x0106), // 0x0106 (262) RtlAppendUnicodeStringToString (uint32)FUNC(&xboxkrnl::RtlAppendUnicodeStringToString), // 0x0106 (262)
(uint32)PANIC(0x0107), // 0x0107 (263) RtlAppendUnicodeToString (uint32)FUNC(&xboxkrnl::RtlAppendUnicodeToString), // 0x0107 (263)
(uint32)FUNC(&xboxkrnl::RtlAssert), // 0x0108 (264) (uint32)FUNC(&xboxkrnl::RtlAssert), // 0x0108 (264)
(uint32)PANIC(0x0109), // 0x0109 (265) RtlCaptureContext (uint32)PANIC(0x0109), // 0x0109 (265) RtlCaptureContext
(uint32)PANIC(0x010A), // 0x010A (266) RtlCaptureStackBackTrace (uint32)PANIC(0x010A), // 0x010A (266) RtlCaptureStackBackTrace