Implemented RtlUnicodeToMultiByteN
This commit is contained in:
parent
c009ff8eb4
commit
a847c1d45c
|
@ -431,7 +431,18 @@ XBSYSAPI EXPORTNUM(309) NTSTATUS NTAPI RtlUnicodeStringToInteger
|
|||
IN PULONG Value
|
||||
);
|
||||
|
||||
XBSYSAPI VOID *RtlUnicodeToMultiByteN;
|
||||
// ******************************************************************
|
||||
// * 0x0136 - RtlUnicodeToMultiByteN()
|
||||
// ******************************************************************
|
||||
XBSYSAPI EXPORTNUM(310) NTSTATUS NTAPI RtlUnicodeToMultiByteN
|
||||
(
|
||||
IN PCHAR MultiByteString,
|
||||
IN ULONG MaxBytesInMultiByteString,
|
||||
IN PULONG BytesInMultiByteString,
|
||||
IN PWSTR UnicodeString,
|
||||
IN ULONG BytesInUnicodeString
|
||||
);
|
||||
|
||||
XBSYSAPI VOID *RtlUnicodeToMultiByteSize;
|
||||
XBSYSAPI VOID *RtlUnwind;
|
||||
XBSYSAPI VOID *RtlUpcaseUnicodeChar;
|
||||
|
|
|
@ -1023,6 +1023,36 @@ XBSYSAPI EXPORTNUM(309) xboxkrnl::NTSTATUS NTAPI xboxkrnl::RtlUnicodeStringToInt
|
|||
RETURN(ret);
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * 0x0136 - RtlUnicodeToMultiByteN()
|
||||
// ******************************************************************
|
||||
XBSYSAPI EXPORTNUM(310) xboxkrnl::NTSTATUS NTAPI xboxkrnl::RtlUnicodeToMultiByteN
|
||||
(
|
||||
IN PCHAR MultiByteString,
|
||||
IN ULONG MaxBytesInMultiByteString,
|
||||
IN PULONG BytesInMultiByteString,
|
||||
IN PWSTR UnicodeString,
|
||||
IN ULONG BytesInUnicodeString
|
||||
)
|
||||
{
|
||||
LOG_FUNC_BEGIN
|
||||
LOG_FUNC_ARG_OUT(MultiByteString)
|
||||
LOG_FUNC_ARG(MaxBytesInMultiByteString)
|
||||
LOG_FUNC_ARG(BytesInMultiByteString)
|
||||
LOG_FUNC_ARG(UnicodeString)
|
||||
LOG_FUNC_ARG(BytesInUnicodeString)
|
||||
LOG_FUNC_END;
|
||||
|
||||
NTSTATUS ret = NtDll::RtlUnicodeToMultiByteN(
|
||||
MultiByteString,
|
||||
MaxBytesInMultiByteString,
|
||||
BytesInMultiByteString,
|
||||
UnicodeString,
|
||||
BytesInUnicodeString);
|
||||
|
||||
RETURN(ret);
|
||||
}
|
||||
|
||||
// Prevent errors compiling RtlZeroMemory (TODO : How should we really do this?)
|
||||
#undef RtlZeroMemory
|
||||
|
||||
|
|
|
@ -148,4 +148,5 @@ IMPORT(RtlTimeToTimeFields);
|
|||
IMPORT(RtlTryEnterCriticalSection);
|
||||
IMPORT(RtlUlongByteSwap);
|
||||
IMPORT(RtlUnicodeStringToAnsiString);
|
||||
IMPORT(RtlUnicodeStringToInteger);
|
||||
IMPORT(RtlUnicodeStringToInteger);
|
||||
IMPORT(RtlUnicodeToMultiByteN);
|
||||
|
|
|
@ -925,6 +925,18 @@ typedef NTSTATUS (NTAPI *FPTR_RtlUnicodeStringToInteger)
|
|||
OUT PULONG Value
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * RtlUnicodeToMultiByteN
|
||||
// ******************************************************************
|
||||
typedef NTSTATUS (NTAPI *FPTR_RtlUnicodeToMultiByteN)
|
||||
(
|
||||
OUT PCHAR MultiByteString,
|
||||
IN ULONG MaxBytesInMultiByteString,
|
||||
OUT PULONG BytesInMultiByteString OPTIONAL,
|
||||
IN PCWCH UnicodeString,
|
||||
IN ULONG BytesInUnicodeString
|
||||
);
|
||||
|
||||
// ******************************************************************
|
||||
// * RtlCompareMemory
|
||||
// ******************************************************************
|
||||
|
@ -1889,6 +1901,7 @@ EXTERN(RtlTryEnterCriticalSection);
|
|||
EXTERN(RtlUlongByteSwap);
|
||||
EXTERN(RtlUnicodeStringToAnsiString);
|
||||
EXTERN(RtlUnicodeStringToInteger);
|
||||
EXTERN(RtlUnicodeToMultiByteN);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
|
@ -375,7 +375,7 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[379] =
|
|||
(uint32)FUNC(&xboxkrnl::RtlUlongByteSwap), // 0x0133 (307)
|
||||
(uint32)FUNC(&xboxkrnl::RtlUnicodeStringToAnsiString), // 0x0134 (308)
|
||||
(uint32)FUNC(&xboxkrnl::RtlUnicodeStringToInteger), // 0x0135 (309)
|
||||
(uint32)PANIC(0x0136), // 0x0136 (310) RtlUnicodeToMultiByteN
|
||||
(uint32)FUNC(&xboxkrnl::RtlUnicodeToMultiByteN), // 0x0136 (310)
|
||||
(uint32)PANIC(0x0137), // 0x0137 (311) RtlUnicodeToMultiByteSize
|
||||
(uint32)PANIC(0x0138), // 0x0138 (312) RtlUnwind
|
||||
(uint32)PANIC(0x0139), // 0x0139 (313) RtlUpcaseUnicodeChar
|
||||
|
|
Loading…
Reference in New Issue