// wdfstring.h
VOID WdfStringGetUnicodeString(
[in] WDFSTRING String,
[out] PUNICODE_STRING UnicodeString
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF and UMDF]
The WdfStringGetUnicodeString method retrieves the Unicode string that is assigned to a specified framework string object.
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.
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.
The following code example obtains the Unicode string that is assigned to a specified framework string object.
UNICODE_STRING StringName;
WdfStringGetUnicodeString(
stringHandle,
&StringName
);