WdfStringGetUnicodeString function (wdfstring.h)
[Applies to KMDF and UMDF]
The WdfStringGetUnicodeString method retrieves the Unicode string that is assigned to a specified framework string object.
Syntax
void WdfStringGetUnicodeString(
[in] WDFSTRING String,
[out] PUNICODE_STRING UnicodeString
);
Parameters
[in] String
A handle to a framework string object.
[out] UnicodeString
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.
Return value
None
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
);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdfstring.h (include Wdf.h) |
Library | Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF) |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf) |