summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usb/umdf2_fx2/driver/Device.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/usb/umdf2_fx2/driver/Device.c b/usb/umdf2_fx2/driver/Device.c
index e7d521e3..7ceaa72c 100644
--- a/usb/umdf2_fx2/driver/Device.c
+++ b/usb/umdf2_fx2/driver/Device.c
@@ -424,9 +424,24 @@ Return Value:
// restart.
//
if (pDeviceContext->UsbDevice == NULL) {
+
+#if UMDF_VERSION_MINOR >= 25
+ WDF_USB_DEVICE_CREATE_CONFIG createParams;
+
+ WDF_USB_DEVICE_CREATE_CONFIG_INIT(&createParams,
+ USBD_CLIENT_CONTRACT_VERSION_602);
+
+ status = WdfUsbTargetDeviceCreateWithParameters(
+ Device,
+ &createParams,
+ WDF_NO_OBJECT_ATTRIBUTES,
+ &pDeviceContext->UsbDevice);
+#else
status = WdfUsbTargetDeviceCreate(Device,
WDF_NO_OBJECT_ATTRIBUTES,
&pDeviceContext->UsbDevice);
+#endif
+
if (!NT_SUCCESS(status)) {
TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP,
"WdfUsbTargetDeviceCreate failed with Status code %!STATUS!\n", status);