PURPOSE
Transfers the license string to the WinDriver kernel module and
returns information regarding the license type of the specified license
string.
NOTE: When using the high-level WDC library APIs, described in the WinDriver PCI Manual, the license registration is done via the WDC_DriverOpen() function, so you do no need to call WD_License() directly.
PROTOTYPE
DWORD WD_License(
HANDLE hWD,
WD_LICENSE *pLicense);
PARAMETERS
| Name | Type | Input/Output |
|---|---|---|
| HANDLE | Input | |
| WD_LICENSE* | ||
| CHAR[] | Input | |
| DWORD | Output | |
| DWORD | Output |
DESCRIPTION
| Name | Description |
|---|---|
| hWD | Handle to WinDriver's kernel-mode driver as received from WD_Open() [5.2] |
| pLicense | Pointer to a WinDriver license information structure: |
| A buffer to contain the license string that is to be transferred to the WinDriver kernel module. If an empty string is transferred, then WinDriver kernel module returns the current license type to the parameter dwLicense. | |
| Returns the license type of the specified license string (cLicnese). The return value is a bit-mask of license flags, defined as an enum in windrvr.h. Zero signifies an invalid license string. Additional flags for determining the license type are returned in dwLicense2, if needed. | |
| Returns additional flags for determining the license type, if dwLicense cannot hold all the relevant information (otherwise - zero) |
RETURN VALUE
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].
REMARKS
EXAMPLE
Example usage: Add registration routine to your application:
DWORD RegisterWinDriver()
{
HANDLE hWD;
WD_LICENSE lic;
DWORD dwStatus = WD_INVALID_HANDLE;
hWD = WD_Open();
if (hWD!=INVALID_HANDLE_VALUE)
{
BZERO(lic);
/* Replace the following string with your license string: */
strcpy(lic.cLicense, "12345abcde12345.CompanyName");
dwStatus = WD_License(hWD, &lic);
WD_Close(hWD);
}
return dwStatus;
}