WofGetDriverVersion function

Used to query the version of the driver used to support a particular provider.


HRESULT WofGetDriverVersion(
  HANDLE FileOrVolumeHandle,
  ULONG  Provider,
  PULONG WofVersion



A handle to a file or volume opened with CreateFile or a similar API.


Indicates which provider the version query is intended for. Multiple versions of Wof may exist on the same volume at the same time for different providers.


Pointer to a ULONG which will contain the version upon successful completion of this function.

Return Value

This function returns an HRESULT indicating success or the reason for failure. If no driver is attached on the specified volume for the specified provider, the function will fail with HRESULT_FROM_WIN32(ERROR_INVALID_FUNCTION).


On successful completion, the WofVersion value is updated to reflect the version of the WOF driver. This value includes the major and minor version numbers of the operating system in the high-order word, and the build number of the operating system in the low-order word. The major version can be extracted with HIBYTE(HIWORD(WofVersion)); the minor version can be extracted with LOBYTE(HIWORD(WofVersion)); the build number can be extracted with LOWORD(WofVersion).



Target Platform Windows
Header wofapi.h
Library Wofutil.lib
DLL Wofutil.dll

See Also