WdfDriverIsVersionAvailable method

[Applies to KMDF and UMDF]

The WdfDriverIsVersionAvailable method returns a Boolean value that indicates whether the driver is running with a specified version of the Kernel-Mode Driver Framework library.

Syntax


BOOLEAN WdfDriverIsVersionAvailable(
  [in]  WDFDRIVER Driver,
  [in]  PWDF_DRIVER_VERSION_AVAILABLE_PARAMS VersionAvailableParams
);

Parameters

Driver [in]

A handle to the driver's framework driver object that the driver obtained from a previous call to WdfDriverCreate or WdfGetDriver.

VersionAvailableParams [in]

A pointer to a WDF_DRIVER_VERSION_AVAILABLE_PARAMS structure that identifies a version of the framework library.

Return value

WdfDriverIsVersionAvailable returns TRUE if the driver is running with the version of the library that the VersionAvailableParams parameter specifies.

The method returns FALSE if the driver is not running with the specified library version or if the WDF_DRIVER_VERSION_AVAILABLE_PARAMS structure is invalid.

A system bug check occurs if the Driver handle is invalid.

Remarks

For more information about library versions, see Framework Library Versioning.

Examples

The following code example reports an error if it detects an unexpected library version number.


WDF_DRIVER_VERSION_AVAILABLE_PARAMS ver;

WDF_DRIVER_VERSION_AVAILABLE_PARAMS_INIT(&ver, 1, 0);
if (!WdfDriverIsVersionAvailable(
                                 driver,
                                 &ver
                                 )) {
    DbgPrint("Unexpected library version.\n");
}

Requirements

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdfdriver.h (include Wdf.h)

Library

Wdf01000.sys (KMDF);
WUDFx02000.dll (UMDF)

IRQL

PASSIVE_LEVEL

DDI compliance rules

DriverCreate, KmdfIrql, KmdfIrql2

See also

WDF_DRIVER_VERSION_AVAILABLE_PARAMS
WdfDriverCreate
WdfDriverRetrieveVersionString
WdfGetDriver

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft