NdisInitializeString - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ndis.h

VOID NdisInitializeString(
  PNDIS_STRING Destination,
  PUCHAR       Source
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ndis-ndisinitializestring)

NdisInitializeString function

Description

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

Parameters

Destination

A pointer to an NDIS_STRING with a NULL buffer. On return from this function, the NDIS_STRING contains an initialized, counted string. For Windows 2000 and later, NDIS defines the NDIS_STRING type as a UNICODE_STRING type.

Source

A pointer to a null-terminated string with which to initialize the counted string. SourceString must not be NULL.

Remarks

NdisInitializeString sets the Length and MaximumLength members of NDIS_STRING for the destination string and terminates the destination string with zero. For Windows 2000 and later drivers,NdisInitializeString converts the supplied source string to Unicode characters.

SourceString must not be NULL.

The buffer allocated by NdisInitializeString should be released with the NdisFreeString function.

See also

ANSI_STRING

DriverEntry of NDIS Protocol Drivers

MiniportInitializeEx

RtlAnsiStringToUnicodeString

RtlEqualUnicodeString

RtlFreeAnsiString

RtlFreeUnicodeString

RtlInitString

RtlInitUnicodeString

RtlUnicodeStringToAnsiString

UNICODE_STRING