// wdfdriver.h
NTSTATUS WdfDriverRetrieveDriverDataDirectoryString(
[_In_] WDFDRIVER Driver,
[_In_] WDFSTRING String
);
View the official Windows Driver Kit DDI referenceNo description available.
[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.
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.
WdfDriverRetrieveDriverDataDirectoryString returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method returns an appropriate NTSTATUS error code. For more information, see NTSTATUS Values.
To achieve the same result, a KMDF driver should call IoGetDriverDirectory instead.
For more information about string objects, see Using String Objects.
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;
}
}
_DRIVER_DIRECTORY_TYPE Enumeration