WdfDriverRetrieveDriverDataDirectoryString function (wdfdriver.h)
[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(
[_In_] WDFDRIVER Driver,
[_In_] WDFSTRING String
);
Parameters
[_In_] Driver
A handle to the driver's framework driver object that the driver obtained from a previous call to WdfDriverCreate or WdfDeviceGetDriver.
[_In_] String
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
Requirement | Value |
---|---|
Minimum UMDF version | 2.27 |
Header | wdfdriver.h |
IRQL | PASSIVE_LEVEL |