test: nlssup.c File Reference

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# nlssup.c File Reference

`#include "ntrtlp.h"`

Go to the source code of this file.

## Functions

WCHAR | RtlAnsiCharToUnicodeChar (IN OUT PCHAR *SourceCharacter)
VOID | RtlpAnsiPszToUnicodePsz (IN PCHAR AnsiString, IN WCHAR *UnicodeString, IN USHORT AnsiStringLength)

## Function Documentation

WCHAR RtlAnsiCharToUnicodeChar | ( | IN OUT PCHAR * | SourceCharacter | ) |

Definition at line 25 of file nlssup.c.

    00031                    :
    00032
    00033     This function translates the specified ansi character to unicode and
    00034     returns the unicode value.  The purpose for this routine is to allow
    00035     for character by character ansi to unicode translation.  The
    00036     translation is done with respect to the current system locale
    00037     information.
    00038
    00039
    00040 Arguments:
    00041
    00042     SourceCharacter - Supplies a pointer to an ansi character pointer.
    00043         Through two levels of indirection, this supplies an ansi
    00044         character that is to be translated to unicode.  After
    00045         translation, the ansi character pointer is modified to point to
    00046         the next character to be converted.  This is done to allow for
    00047         dbcs ansi characters.
    00048
    00049 Return Value:
    00050
    00051     Returns the unicode equivalent of the specified ansi character.
    00052
    00053 --*/
    00054
    00055 {
    00056     WCHAR UnicodeCharacter;
    00057
    00058     //
    00059     // Note that this needs to reference the translation table !
    00060     //
    00061
    00062     UnicodeCharacter = **SourceCharacter;
    00063     (*SourceCharacter)++;
    00064     return UnicodeCharacter;
    00065 }

VOID RtlpAnsiPszToUnicodePsz | ( | IN PCHAR | AnsiString,
|  | IN WCHAR * | UnicodeString,
|  | IN USHORT | AnsiStringLength
| ) |

Definition at line 69 of file nlssup.c.

References Index, and RtlAnsiCharToUnicodeChar().

    00077                    :
    00078
    00079     This function translates the specified ansi character to unicode and
    00080     returns the unicode value.  The purpose for this routine is to allow
    00081     for character by character ansi to unicode translation.  The
    00082     translation is done with respect to the current system locale
    00083     information.
    00084
    00085
    00086 Arguments:
    00087
    00088     AnsiString - Supplies a pointer to the ANSI string to convert to unicode.
    00089     UnicodeString - Supplies a pointer to a buffer to hold the unicode string
    00090     AnsiStringLength - Supplies the length of the ANSI string.
    00091
    00092 Return Value:
    00093
    00094     None.
    00095
    00096 --*/
    00097
    00098 {
    00099     ULONG Index;
    00100     PCHAR AnsiChar;
    00101
    00102     AnsiChar = AnsiString;
    00103     Index = 0;
    00104     while(Index < AnsiStringLength ) {
    00105         UnicodeString[Index] = RtlAnsiCharToUnicodeChar(&AnsiChar);
    00106         Index++;
    00107         }
    00108     UnicodeString[Index] = UNICODE_NULL;
    00109 }
    }