NdisUnicodeStringToAnsiString

This function converts a specified counted Unicode string into a counted ASCII string. The translation conforms to the current system locale information.

At a Glance

Header file: Ndis.h
Windows CE versions: 2.0 and later

Syntax

NDIS_STATUS NdisUnicodeStringToAnsiString(
IN OUT PNDIS_ANSI_STRING
DestinationString,
IN PNDIS_STRING
SourceString );

Parameters

DestinationString
Pointer to a caller-allocated buffer in which this function should return the converted ASCII string.
SourceString
Points to the Unicode string to be converted.

Return Values

NDIS_STATUS_SUCCESS indicates success. Otherwise, the contents of the buffer at DestinationString are unaffected.

Remarks

The caller must allocate storage for both the source and destination strings and release these buffers as soon as the strings are no longer needed. The buffer at SourceString must be at least twice the size of that at DestinationString.

A driver that calls this function runs at IRQL PASSIVE_LEVEL.

See Also

NdisAnsiStringToUnicodeString, NdisInitAnsiString, NdisInitializeString, NdisInitUnicodeString