Jungo WinDriver  
Official Documentation

◆ WD_License

#define WD_License (   h,
  pLicense 
)     WD_FUNCTION(IOCTL_WD_LICENSE, h, pLicense, sizeof(WD_LICENSE), FALSE)

Transfers the license string to the WinDriver kernel module 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 not need to call WD_License() directly.

Parameters
[in]hHandle to WinDriver's kernel-mode driver as received from WD_Open()
[in]pLicensePointer to a WinDriver license information structure
Returns
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise: WD_MORE_PROCESSING_REQUIRED will be returned when this license requires further online validation using the WinDriver Agent. See WD_AgentStart() for more info.
Remarks
When using any registered version, this function must be called before any other WinDriver API call, apart from WD_Open(), in order to register the license from the code.
/* Use the returned handle when calling WinDriver API functions */
HANDLE WinDriverOpenAndRegister(void)
{
HANDLE hWD;
DWORD dwStatus;
hWD = WD_Open();
{
BZERO(lic);
/* Replace the following string with your license string: */
strcpy(lic.cLicense, "12345abcde12345.CompanyName");
dwStatus = WD_License(hWD, &lic);
if (WD_MORE_PROCESSING_REQUIRED == dwStatus)
{
dwStatus = WD_AgentStart(hWD, lic.cLicense, 0);
if (WD_STATUS_SUCCESS != dwStatus)
{
WDC_Err("%s: Failed starting agent: %s\n", __FUNCTION__,
Stat2Str(dwStatus));
}
}
if (dwStatus != WD_STATUS_SUCCESS)
{
WD_Close(hWD);
}
}
return hWD;
}
char *__cdecl strcpy(char *s1, const char *s2)
const char *DLLCALLCONV Stat2Str(_In_ DWORD dwStatus)
Retrieves the status string that corresponds to a status code.
CHAR cLicense[WD_LICENSE_LENGTH]
Buffer with license string to put.
Definition: windrvr.h:691
#define WD_Close
Definition: wd_log.h:64
#define WD_Open
Definition: wd_log.h:65
DWORD WD_AgentClose(void)
Close the WinDriver Agent that allows validating the license string in the running WinDriver-based pr...
DWORD WD_AgentStart(_In_ HANDLE hWD, _In_ const char *pcLicense, _In_ DWORD dwTimeout)
Start the WinDriver Agent that allows validating the license string in the running WinDriver-based pr...
void DLLCALLCONV WDC_Err(const CHAR *format,...)
Displays debug error messages according to the WDC debug options.
@ WD_MORE_PROCESSING_REQUIRED
[0xC0000016] More Processing Required.
Definition: windrvr.h:1272
@ WD_STATUS_SUCCESS
[0] Operation completed successfully
Definition: windrvr.h:1083
#define INVALID_HANDLE_VALUE
Definition: windrvr.h:1577
#define BZERO(buf)
Definition: windrvr.h:1573
#define WD_License(h, pLicense)
Transfers the license string to the WinDriver kernel module When using the high-level WDC library API...
Definition: windrvr.h:2561
#define __FUNCTION__
Definition: windrvr.h:52

Definition at line 2561 of file windrvr.h.