WdfStringGetUnicodeString - NtDoc

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

VOID WdfStringGetUnicodeString(
  [in]  WDFSTRING       String,
  [out] PUNICODE_STRING UnicodeString
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfstring-wdfstringgetunicodestring)

WdfStringGetUnicodeString function

Description

[Applies to KMDF and UMDF]

The WdfStringGetUnicodeString method retrieves the Unicode string that is assigned to a specified framework string object.

Parameters

String [in]

A handle to a framework string object.

UnicodeString [out]

A pointer to a UNICODE_STRING structure that receives a pointer to the Unicode string that is currently assigned to the string object that String specifies.

Remarks

A bug check occurs if the driver supplies an invalid object handle.

After WdfStringGetUnicodeString returns, the UNICODE_STRING structure that UnicodeString points to contains a pointer to the specified string object's Unicode string, along with the string's length. The Unicode string is allocated in paged pool.

The framework does not make a copy of the string for the driver.

For more information about framework string objects, see Using String Objects.

Examples

The following code example obtains the Unicode string that is assigned to a specified framework string object.

UNICODE_STRING StringName;

WdfStringGetUnicodeString(
                          stringHandle,
                          &StringName
                          );

See also

UNICODE_STRING

WdfStringCreate