next up previous contents
Next: 5.4 WD_Close() Up: 5. General WD_xxx Functions Previous: 5.2 WD_Open()   Contents


5.3 WD_Version()


PURPOSE

$\bullet$Returns the version number of the WinDriver kernel module currently running.


PROTOTYPE

DWORD WD_Version(
    HANDLE hWD,
    WD_VERSION *pVer);


PARAMETERS

Name Type Input/Output
$\bullet$hWD HANDLE Input
$\bullet$pVer WD_VERSION*  
$\gg$dwVer DWORD Output
$\gg$cVer CHAR[128] Output


DESCRIPTION

Name Description
hWD Handle to WinDriver's kernel-mode driver as received from WD_Open() [5.2]
pVer Pointer to a WinDriver version information structure:
$\bullet$ dwVer The version number
$\bullet$ cVer Version information string.
The version string's size is limited to 128 characters (including the NULL terminator character).


RETURN VALUE

Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].


EXAMPLE

WD_VERSION ver;

BZERO(ver);
WD_Version(hWD, &ver);
printf("%s\n", ver.cVer);
if (ver.dwVer < WD_VER)
{
    printf("Error - incorrect WinDriver version\n");
}