Previous Next

NdisAnsiStringToUnicodeString

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

NDIS_STATUS
  NdisAnsiStringToUnicodeString(
    IN OUT PUNICODE_STRING  DestinationString,
    IN PNDIS_PANSI_STRING  SourceString
    );

Parameters

DestinationString
Pointer to a caller-allocated buffer in which this function should return the converted Unicode string.
SourceString
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.

Headers

Declared in Ndis.h. Include Ndis.h.

Comments

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 that at SourceString.

Callers of NdisAnsiStringToUnicodeString run at IRQL = PASSIVE_LEVEL.

See Also

ANSI_STRING, DriverEntry of NDIS Protocol Drivers, MiniportInitialize, NdisInitAnsiString, NdisInitializeString, NdisInitUnicodeString, NdisUnicodeStringToAnsiString, ProtocolBindAdapter, UNICODE_STRING