WdfDriverRetrieveDriverDataDirectoryString function
[Applies to UMDF only]
The WdfDriverRetrieveDriverDataDirectoryString method returns a path to a directory on disk in which the driver can store information. The files in that directory apply to a specific framework driver object.
Syntax
NTSTATUS WdfDriverRetrieveDriverDataDirectoryString(
WDFDRIVER Driver,
WDFSTRING String
);
Parameters
Driver
[In] A handle to the driver's framework driver object that the driver obtained from a previous call to WdfDriverCreate or WdfDeviceGetDriver.
String
[In] A handle to a framework string object that the driver obtained from a previous call to WdfStringCreate. The framework assigns the fully qualified path of the requested driver directory to the string object.
Return Value
WdfDriverRetrieveDriverDataDirectoryString returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method returns an appropriate NTSTATUS error code. For more information, see NTSTATUS Values.
Remarks
To achieve the same result, a KMDF driver should call IoGetDriverDirectory instead.
For more information about string objects, see Using String Objects.
Examples
The following code example shows how to call WdfDriverRetrieveDriverDataDirectoryString:
NTSTATUS status;
WDFSTRING string;
status = WdfStringCreate(
NULL,
WDF_NO_OBJECT_ATTRIBUTES,
&string
);
if (NT_SUCCESS(status)) {
status = WdfDriverRetrieveDriverDataDirectoryString(
Driver,
string
);
if (!NT_SUCCESS(status)) {
return status;
}
}
Requirements
Minimum UMDF version | 2.27 |
Header | wdfdriver.h |
IRQL | PASSIVE_LEVEL |
See Also
Feedback
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.
Loading feedback...