mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
- simplified BasepAnsiStringToHeapUnicodeString
- fixed linking (global variable Basep8BitStringToUnicodeString was missing) - fixed typo in the debug print in SetThreadUILanguage svn path=/trunk/; revision=16886
This commit is contained in:
parent
4214fc67a7
commit
f5bba7d9af
2 changed files with 18 additions and 15 deletions
|
@ -13,6 +13,10 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include "../include/debug.h"
|
#include "../include/debug.h"
|
||||||
|
|
||||||
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
|
PRTL_CONVERT_STRING Basep8BitStringToUnicodeString;
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -104,7 +108,7 @@ Basep8BitStringToHeapUnicodeString(OUT PUNICODE_STRING UnicodeString,
|
||||||
VOID
|
VOID
|
||||||
STDCALL
|
STDCALL
|
||||||
BasepAnsiStringToHeapUnicodeString(IN LPCSTR AnsiString,
|
BasepAnsiStringToHeapUnicodeString(IN LPCSTR AnsiString,
|
||||||
IN LPWSTR* UnicodeString)
|
OUT LPWSTR* UnicodeString)
|
||||||
{
|
{
|
||||||
ANSI_STRING AnsiTemp;
|
ANSI_STRING AnsiTemp;
|
||||||
UNICODE_STRING UnicodeTemp;
|
UNICODE_STRING UnicodeTemp;
|
||||||
|
@ -114,17 +118,16 @@ BasepAnsiStringToHeapUnicodeString(IN LPCSTR AnsiString,
|
||||||
/* First create the ANSI_STRING */
|
/* First create the ANSI_STRING */
|
||||||
RtlInitAnsiString(&AnsiTemp, AnsiString);
|
RtlInitAnsiString(&AnsiTemp, AnsiString);
|
||||||
|
|
||||||
/* Now get the size needed */
|
if (NT_SUCCESS(RtlAnsiStringToUnicodeString(&UnicodeTemp,
|
||||||
UnicodeTemp.MaximumLength = RtlAnsiStringToUnicodeSize(&AnsiTemp);
|
&AnsiTemp,
|
||||||
|
TRUE)))
|
||||||
/* Allocate space from the Heap for the string */
|
{
|
||||||
*UnicodeString = RtlAllocateHeap(GetProcessHeap(),
|
*UnicodeString = UnicodeTemp.Buffer;
|
||||||
0,
|
}
|
||||||
UnicodeTemp.MaximumLength);
|
else
|
||||||
|
{
|
||||||
/* Save the buffer and convert */
|
*UnicodeString = NULL;
|
||||||
UnicodeTemp.Buffer = *UnicodeString;
|
}
|
||||||
RtlAnsiStringToUnicodeString(&UnicodeTemp, &AnsiTemp, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -739,7 +739,7 @@ GetThreadId(HANDLE Thread)
|
||||||
LANGID STDCALL
|
LANGID STDCALL
|
||||||
SetThreadUILanguage(WORD wReserved)
|
SetThreadUILanguage(WORD wReserved)
|
||||||
{
|
{
|
||||||
DPRINT1("SetThreadUILanguage(0x%2x) unimplemented!\n", wReserved);
|
DPRINT1("SetThreadUILanguage(0x%4x) unimplemented!\n", wReserved);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue