5.2. WD_Open()

Purpose

Opens a handle to access the WinDriver kernel module.
The handle is used by all WinDriver APIs, and therefore must be called before any other WinDriver API is called.

Prototype
HANDLE WD_Open(void);
Return Value

The handle to the WinDriver kernel module.
If device could not be opened, returns INVALID_HANDLE_VALUE.

Remarks

If you are a registered user, please refer to the documentation of WD_License() [5.9] for an example of how to register your WinDriver license.

Example
 HANDLE hWD;

hWD = WD_Open();
if (hWD == INVALID_HANDLE_VALUE)
{
    printf("Cannot open WinDriver device\n");
}