Unify string API parameter types to PCSTR/PCWSTR
This commit is contained in:
parent
9577a39046
commit
602da0960c
@ -83,26 +83,26 @@ RtlCompareMemory(IN PCVOID LeftBuffer,
|
||||
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlCompareString(IN CONST PCHAR String1,
|
||||
IN CONST PCHAR String2,
|
||||
RtlCompareString(IN PCSTR String1,
|
||||
IN PCSTR String2,
|
||||
IN SIZE_T Length);
|
||||
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlCompareStringInsensitive(IN CONST PCHAR String1,
|
||||
IN CONST PCHAR String2,
|
||||
RtlCompareStringInsensitive(IN PCSTR String1,
|
||||
IN PCSTR String2,
|
||||
IN SIZE_T Length);
|
||||
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlCompareWideString(IN CONST PWCHAR String1,
|
||||
IN CONST PWCHAR String2,
|
||||
RtlCompareWideString(IN PCWSTR String1,
|
||||
IN PCWSTR String2,
|
||||
IN SIZE_T Length);
|
||||
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlCompareWideStringInsensitive(IN CONST PWCHAR String1,
|
||||
IN CONST PWCHAR String2,
|
||||
RtlCompareWideStringInsensitive(IN PCWSTR String1,
|
||||
IN PCWSTR String2,
|
||||
IN SIZE_T Length);
|
||||
|
||||
XTAPI
|
||||
@ -134,13 +134,13 @@ RtlCopyMemory(OUT PVOID Destination,
|
||||
XTAPI
|
||||
VOID
|
||||
RtlCopyString(IN PCHAR Destination,
|
||||
IN PCCHAR Source,
|
||||
IN PCSTR Source,
|
||||
IN ULONG Length);
|
||||
|
||||
XTAPI
|
||||
VOID
|
||||
RtlCopyWideString(IN PWCHAR Destination,
|
||||
IN CONST PWCHAR Source,
|
||||
IN PCWSTR Source,
|
||||
IN ULONG Length);
|
||||
|
||||
XTAPI
|
||||
@ -162,24 +162,24 @@ RtlFindSetBits(IN PRTL_BITMAP BitMap,
|
||||
IN ULONG_PTR Index);
|
||||
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlFindString(IN PCHAR Source,
|
||||
IN PCHAR Search);
|
||||
PCSTR
|
||||
RtlFindString(IN PCSTR Source,
|
||||
IN PCSTR Search);
|
||||
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlFindStringInsensitive(IN PCHAR Source,
|
||||
IN PCHAR Search);
|
||||
PCSTR
|
||||
RtlFindStringInsensitive(IN PCSTR Source,
|
||||
IN PCSTR Search);
|
||||
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlFindWideString(IN PWCHAR Source,
|
||||
IN PWCHAR Search);
|
||||
PCWSTR
|
||||
RtlFindWideString(IN PCWSTR Source,
|
||||
IN PCWSTR Search);
|
||||
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlFindWideStringInsensitive(IN PWCHAR Source,
|
||||
IN PWCHAR Search);
|
||||
PCWSTR
|
||||
RtlFindWideStringInsensitive(IN PCWSTR Source,
|
||||
IN PCWSTR Search);
|
||||
|
||||
XTAPI
|
||||
XTSTATUS
|
||||
@ -249,13 +249,13 @@ RtlSetMemory(OUT PVOID Destination,
|
||||
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlStringLength(IN CONST PCHAR String,
|
||||
RtlStringLength(IN PCSTR String,
|
||||
IN SIZE_T MaxLength);
|
||||
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlStringToWideString(OUT PWCHAR Destination,
|
||||
IN CONST PCHAR *Source,
|
||||
IN PCSTR *Source,
|
||||
IN SIZE_T Length);
|
||||
|
||||
XTAPI
|
||||
@ -266,13 +266,13 @@ RtlTestBit(IN PRTL_BITMAP BitMap,
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlTokenizeString(IN PCHAR String,
|
||||
IN CONST PCHAR Delimiter,
|
||||
IN PCSTR Delimiter,
|
||||
IN OUT PCHAR *SavePtr);
|
||||
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlTokenizeWideString(IN PWCHAR String,
|
||||
IN CONST PWCHAR Delimiter,
|
||||
IN PCWSTR Delimiter,
|
||||
IN OUT PWCHAR *SavePtr);
|
||||
|
||||
XTAPI
|
||||
@ -293,31 +293,31 @@ RtlToUpperWideCharacter(IN WCHAR Character);
|
||||
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlTrimLeftString(IN CONST PCHAR String);
|
||||
RtlTrimLeftString(IN PCHAR String);
|
||||
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlTrimLeftWideString(IN CONST PWCHAR String);
|
||||
RtlTrimLeftWideString(IN PWCHAR String);
|
||||
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlTrimRightString(IN CONST PCHAR String);
|
||||
RtlTrimRightString(IN PCHAR String);
|
||||
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlTrimRightWideString(IN CONST PWCHAR String);
|
||||
RtlTrimRightWideString(IN PWCHAR String);
|
||||
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlTrimString(IN CONST PCHAR String);
|
||||
RtlTrimString(IN PCHAR String);
|
||||
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlTrimWideString(IN CONST PWCHAR String);
|
||||
RtlTrimWideString(IN PWCHAR String);
|
||||
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlWideStringLength(IN CONST PWCHAR String,
|
||||
RtlWideStringLength(IN PCWSTR String,
|
||||
IN SIZE_T MaxLength);
|
||||
|
||||
XTAPI
|
||||
|
@ -681,7 +681,7 @@ BlpParseConfigFile(IN CONST PCHAR RawConfig,
|
||||
|
||||
/* Initialize new section and convert its name to wide string */
|
||||
RtlInitializeListHead(&Section->Options);
|
||||
RtlStringToWideString(Section->SectionName, &SectionName, SectionLength);
|
||||
RtlStringToWideString(Section->SectionName, (PCSTR*)&SectionName, SectionLength);
|
||||
|
||||
/* Ensure string is NULL-terminated and add new section to the configuration list */
|
||||
Section->SectionName[SectionLength] = L'\0';
|
||||
@ -770,8 +770,8 @@ BlpParseConfigFile(IN CONST PCHAR RawConfig,
|
||||
}
|
||||
|
||||
/* Convert key and value to wide strings */
|
||||
RtlStringToWideString(Option->Name, &Key, RtlStringLength(Key, 0) + 1);
|
||||
RtlStringToWideString(Option->Value, &Value, RtlStringLength(Value, 0) + 1);
|
||||
RtlStringToWideString(Option->Name, (PCSTR*)&Key, RtlStringLength(Key, 0) + 1);
|
||||
RtlStringToWideString(Option->Value, (PCSTR*)&Value, RtlStringLength(Value, 0) + 1);
|
||||
|
||||
/* Ensure strings are NULL-terminated and add new option to the list */
|
||||
Option->Name[KeyLength] = L'\0';
|
||||
|
@ -27,8 +27,8 @@
|
||||
*/
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlCompareString(IN CONST PCHAR String1,
|
||||
IN CONST PCHAR String2,
|
||||
RtlCompareString(IN PCSTR String1,
|
||||
IN PCSTR String2,
|
||||
IN SIZE_T Length)
|
||||
{
|
||||
SIZE_T Index;
|
||||
@ -79,8 +79,8 @@ RtlCompareString(IN CONST PCHAR String1,
|
||||
*/
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlCompareStringInsensitive(IN CONST PCHAR String1,
|
||||
IN CONST PCHAR String2,
|
||||
RtlCompareStringInsensitive(IN PCSTR String1,
|
||||
IN PCSTR String2,
|
||||
IN SIZE_T Length)
|
||||
{
|
||||
CHAR Character1;
|
||||
@ -206,7 +206,7 @@ RtlConcatenateString(OUT PCHAR Destination,
|
||||
XTAPI
|
||||
VOID
|
||||
RtlCopyString(IN PCHAR Destination,
|
||||
IN PCCHAR Source,
|
||||
IN PCSTR Source,
|
||||
IN ULONG Length)
|
||||
{
|
||||
ULONG Index;
|
||||
@ -243,12 +243,12 @@ RtlCopyString(IN PCHAR Destination,
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlFindString(IN PCHAR Source,
|
||||
IN PCHAR Search)
|
||||
PCSTR
|
||||
RtlFindString(IN PCSTR Source,
|
||||
IN PCSTR Search)
|
||||
{
|
||||
PCHAR CurrentSource;
|
||||
PCHAR CurrentSearch;
|
||||
PCSTR CurrentSource;
|
||||
PCSTR CurrentSearch;
|
||||
|
||||
/* Validate input parameters */
|
||||
if(!Source || !Search)
|
||||
@ -305,12 +305,12 @@ RtlFindString(IN PCHAR Source,
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlFindStringInsensitive(IN PCHAR Source,
|
||||
IN PCHAR Search)
|
||||
PCSTR
|
||||
RtlFindStringInsensitive(IN PCSTR Source,
|
||||
IN PCSTR Search)
|
||||
{
|
||||
PCHAR CurrentSource;
|
||||
PCHAR CurrentSearch;
|
||||
PCSTR CurrentSource;
|
||||
PCSTR CurrentSearch;
|
||||
|
||||
/* Validate input parameters */
|
||||
if(!Source || !Search)
|
||||
@ -400,7 +400,7 @@ RtlReverseString(IN OUT PCHAR String,
|
||||
*/
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlStringLength(IN CONST PCHAR String,
|
||||
RtlStringLength(IN PCSTR String,
|
||||
IN SIZE_T MaxLength)
|
||||
{
|
||||
SIZE_T Length;
|
||||
@ -446,10 +446,10 @@ RtlStringLength(IN CONST PCHAR String,
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlStringToWideString(OUT PWCHAR Destination,
|
||||
IN CONST PCHAR *Source,
|
||||
IN PCSTR *Source,
|
||||
IN SIZE_T Length)
|
||||
{
|
||||
PCHAR LocalSource = *Source;
|
||||
PCSTR LocalSource = *Source;
|
||||
SIZE_T Count = Length;
|
||||
|
||||
/* Check if NULL pointer passed */
|
||||
@ -506,7 +506,7 @@ RtlStringToWideString(OUT PWCHAR Destination,
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlTokenizeString(IN PCHAR String,
|
||||
IN CONST PCHAR Delimiter,
|
||||
IN PCSTR Delimiter,
|
||||
IN OUT PCHAR *SavePtr)
|
||||
{
|
||||
PCHAR Span, Token;
|
||||
@ -623,7 +623,7 @@ RtlToUpperCharacter(IN CHAR Character)
|
||||
*/
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlTrimLeftString(IN CONST PCHAR String)
|
||||
RtlTrimLeftString(IN PCHAR String)
|
||||
{
|
||||
PCHAR Start;
|
||||
|
||||
@ -653,7 +653,7 @@ RtlTrimLeftString(IN CONST PCHAR String)
|
||||
*/
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlTrimRightString(IN CONST PCHAR String)
|
||||
RtlTrimRightString(IN PCHAR String)
|
||||
{
|
||||
PCHAR End;
|
||||
|
||||
@ -686,7 +686,7 @@ RtlTrimRightString(IN CONST PCHAR String)
|
||||
*/
|
||||
XTAPI
|
||||
PCHAR
|
||||
RtlTrimString(IN CONST PCHAR String)
|
||||
RtlTrimString(IN PCHAR String)
|
||||
{
|
||||
return RtlTrimLeftString(RtlTrimRightString(String));
|
||||
}
|
||||
|
@ -27,8 +27,8 @@
|
||||
*/
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlCompareWideString(IN CONST PWCHAR String1,
|
||||
IN CONST PWCHAR String2,
|
||||
RtlCompareWideString(IN PCWSTR String1,
|
||||
IN PCWSTR String2,
|
||||
IN SIZE_T Length)
|
||||
{
|
||||
SIZE_T Index;
|
||||
@ -79,8 +79,8 @@ RtlCompareWideString(IN CONST PWCHAR String1,
|
||||
*/
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlCompareWideStringInsensitive(IN CONST PWCHAR String1,
|
||||
IN CONST PWCHAR String2,
|
||||
RtlCompareWideStringInsensitive(IN PCWSTR String1,
|
||||
IN PCWSTR String2,
|
||||
IN SIZE_T Length)
|
||||
{
|
||||
WCHAR Character1;
|
||||
@ -124,7 +124,7 @@ RtlCompareWideStringInsensitive(IN CONST PWCHAR String1,
|
||||
Index++;
|
||||
}
|
||||
|
||||
/* Wide strings are equal */
|
||||
/* Strings are equal */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ RtlConcatenateWideString(OUT PWCHAR Destination,
|
||||
XTAPI
|
||||
VOID
|
||||
RtlCopyWideString(IN PWCHAR Destination,
|
||||
IN CONST PWCHAR Source,
|
||||
IN PCWSTR Source,
|
||||
IN ULONG Length)
|
||||
{
|
||||
ULONG Index;
|
||||
@ -244,12 +244,12 @@ RtlCopyWideString(IN PWCHAR Destination,
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlFindWideString(IN PWCHAR Source,
|
||||
IN PWCHAR Search)
|
||||
PCWSTR
|
||||
RtlFindWideString(IN PCWSTR Source,
|
||||
IN PCWSTR Search)
|
||||
{
|
||||
PWCHAR CurrentSource;
|
||||
PWCHAR CurrentSearch;
|
||||
PCWSTR CurrentSource;
|
||||
PCWSTR CurrentSearch;
|
||||
|
||||
/* Validate input parameters */
|
||||
if(!Source || !Search)
|
||||
@ -306,12 +306,12 @@ RtlFindWideString(IN PWCHAR Source,
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlFindWideStringInsensitive(IN PWCHAR Source,
|
||||
IN PWCHAR Search)
|
||||
PCWSTR
|
||||
RtlFindWideStringInsensitive(IN PCWSTR Source,
|
||||
IN PCWSTR Search)
|
||||
{
|
||||
PWCHAR CurrentSource;
|
||||
PWCHAR CurrentSearch;
|
||||
PCWSTR CurrentSource;
|
||||
PCWSTR CurrentSearch;
|
||||
|
||||
/* Validate input parameters */
|
||||
if(!Source || !Search)
|
||||
@ -480,7 +480,7 @@ RtlReverseWideString(IN OUT PWCHAR String,
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlTokenizeWideString(IN PWCHAR String,
|
||||
IN CONST PWCHAR Delimiter,
|
||||
IN PCWSTR Delimiter,
|
||||
IN OUT PWCHAR *SavePtr)
|
||||
{
|
||||
PWCHAR Span, Token;
|
||||
@ -597,7 +597,7 @@ RtlToUpperWideCharacter(IN WCHAR Character)
|
||||
*/
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlTrimLeftWideString(IN CONST PWCHAR String)
|
||||
RtlTrimLeftWideString(IN PWCHAR String)
|
||||
{
|
||||
PWCHAR Start;
|
||||
|
||||
@ -627,7 +627,7 @@ RtlTrimLeftWideString(IN CONST PWCHAR String)
|
||||
*/
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlTrimRightWideString(IN CONST PWCHAR String)
|
||||
RtlTrimRightWideString(IN PWCHAR String)
|
||||
{
|
||||
PWCHAR End;
|
||||
|
||||
@ -660,7 +660,7 @@ RtlTrimRightWideString(IN CONST PWCHAR String)
|
||||
*/
|
||||
XTAPI
|
||||
PWCHAR
|
||||
RtlTrimWideString(IN CONST PWCHAR String)
|
||||
RtlTrimWideString(IN PWCHAR String)
|
||||
{
|
||||
return RtlTrimLeftWideString(RtlTrimRightWideString(String));
|
||||
}
|
||||
@ -680,7 +680,7 @@ RtlTrimWideString(IN CONST PWCHAR String)
|
||||
*/
|
||||
XTAPI
|
||||
SIZE_T
|
||||
RtlWideStringLength(IN CONST PWCHAR String,
|
||||
RtlWideStringLength(IN PCWSTR String,
|
||||
IN SIZE_T MaxLength)
|
||||
{
|
||||
SIZE_T Length;
|
||||
|
Loading…
x
Reference in New Issue
Block a user