Share via


NdisInitializeString (NDIS 5.1) function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

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

Syntax

VOID NdisInitializeString(
  _Out_ PNDIS_STRING DestinationString,
  _In_  PUCHAR       SourceString
);

Parameters

  • DestinationString [out]
    Specifies NULL when NdisInitializeString is called; on return from this function, points to an NDIS_STRING type that describes an initialized counted string. For Windows 2000 and later, NDIS defines the NDIS_STRING type as a UNICODE_STRING type.

  • SourceString [in]
    Pointer to a null-terminated string with which to initialize the counted string. SourceString must not be NULL.

Return value

None

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 NdisFreeString.

Requirements

Target platform

Universal

Version

See NdisInitializeString.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

PASSIVE_LEVEL

See also

ANSI_STRING

DriverEntry of NDIS Protocol Drivers

MiniportInitialize

NdisAnsiStringToUnicodeString

NdisEqualString

NdisFreeString

NdisInitAnsiString

NdisInitUnicodeString

NdisUnicodeStringToAnsiString

UNICODE_STRING

 

 

Send comments about this topic to Microsoft