RtlInitEmptyAnsiString function (wdm.h)

The RtlInitEmptyAnsiString macro initializes an empty counted ANSI string.

Syntax

void RtlInitEmptyAnsiString(
  [out] PANSI_STRING           AnsiString,
  [in]  __drv_aliasesMem PCHAR Buffer,
  [in]  USHORT                 BufferSize
);

Parameters

[out] AnsiString

Pointer to the ANSI_STRING structure to be initialized.

[in] Buffer

Pointer to a caller-allocated buffer to be used to contain an ANSI string composed of CHAR elements.

[in] BufferSize

Length, in bytes, of the buffer that Buffer points to.

Return value

None

Remarks

The members of the structure that the DestinationString parameter points to are initialized as follows.

  • Length. Zero.

  • MaximumLength. BufferSize.

  • Buffer. SourceString.

To initialize a non-empty counted ANSI string, call RtlInitAnsiString.

Requirements

Requirement Value
Minimum supported client Windows XP
Header wdm.h
IRQL Any level