NdisAnsiStringToUnicodeString function

The NdisAnsiStringToUnicodeString function converts a given counted ANSI string into a counted Unicode string. The translation conforms to the current system locale information.

Syntax


NDIS_STATUS NdisAnsiStringToUnicodeString(
  _Inout_ PUNICODE_STRING DestinationString,
  _In_    PANSI_STRING    SourceString
);

Parameters

DestinationString [in, out]

A pointer to a caller-allocated buffer in which this function should return the converted Unicode string.

SourceString [in]

A pointer to the ANSI string to be converted.

Return value

NdisAnsiStringToUnicodeString returns NDIS_STATUS_SUCCESS if the conversion succeeds. 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 DestinationString must be at least twice the size of the buffer at SourceString .

Requirements

Target platform

Universal

Version

Supported for existing drivers in NDIS 6.0 and later, but new drivers should use RtlAnsiStringToUnicodeString instead.

Header

Ndis.h (include Ndis.h)

IRQL

PASSIVE_LEVEL

DDI compliance rules

Irql_Miscellaneous_Function

See also

ANSI_STRING
DriverEntry of NDIS Protocol Drivers
MiniportInitializeEx
RtlInitUnicodeString
RtlUnicodeStringToAnsiString
ProtocolBindAdapterEx
UNICODE_STRING

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft