NdisInitializeString

VOID
NdisInitializeString(
IN OUT PNDIS_STRING DestinationString,
IN PUCHAR SourceString
);

NdisInitializeString allocates storage for and initializes a counted string in the system-default character set.

Parameters

DestinationString

Specifies NULL when NdisInitializeString is called; on return from this function, points to a buffer containing an initialized counted string.

SourceString

Points to a zero-terminated string with which to initialize the counted string.

Comments

NdisInitializeString sets the Length and MaximumLength for the destination string and terminates the destination string with zero. For Windows NT drivers, this function converts the supplied source string to Unicode characters.

If SourceString is NULL, the lengths are set to zero.

The buffer allocated by this function should be released promptly with NdisFreeString.

Callers of NdisInitializeString run at IRQL PASSIVE_LEVEL.

See Also

DriverEntry of NDIS Protocol Drivers, MiniportInitialize, NdisAnsiStringToUnicodeString, NdisEqualString, NdisFreeString, NdisInitAnsiString, NdisInitUnicodeString, NdisUnicodeStringToAnsiString