{\r
InterlockedIncrement(&WvRef);\r
m_hFile = INVALID_HANDLE_VALUE;\r
+ KernelVersion = WV_KERNEL_VERSION;\r
}\r
\r
CWVProvider::~CWVProvider()\r
return m_hFile;\r
}\r
\r
+/*\r
+ * Version query was not supported in initial version 1 release.\r
+ */\r
+void CWVProvider::\r
+SetKernelVersion(void)\r
+{\r
+ DWORD bytes;\r
+\r
+ if (!WvDeviceIoControl(m_hFile, WV_IOCTL_VERSION_QUERY, NULL, 0,\r
+ &KernelVersion, sizeof(KernelVersion), &bytes, NULL)\r
+ KernelVersion = 1;\r
+ }\r
+}\r
+\r
STDMETHODIMP CWVProvider::\r
QueryDeviceList(NET64* pGuidList, SIZE_T* pBufferSize)\r
{\r
hr = HRESULT_FROM_WIN32(GetLastError());\r
goto err2;\r
}\r
+ wv->SetKernelVersion();\r
*ppProvider = wv;\r
return WV_SUCCESS;\r
\r
*ppProvider = NULL;\r
return hr;\r
}\r
+\r
+ UINT64 KernelVersion;\r
+\r
+private:\r
+ void SetKernelVersion();\r
};\r
\r
#endif // _WV_PROVIDER_H_
\ No newline at end of file