PURPOSE
• Sets the name of the WinDriver kernel module, which will be used by
the calling application.
-
The default driver name, which is used if the function is not called,
is windrvr6.
-
This function must be called once, and only once, from the beginning
of your application, before calling any other WinDriver function
(including
WD_Open/
WDU_Init
), as demonstrated in the sample and generated DriverWizard WinDriver
applications, which include a call to this function with the default
driver name (windrvr6).
-
On Windows and Linux, If you select to modify the name of the
WinDriver kernel module (windrvr6.sys/.o/.ko), as explained in
section 12.2, you must ensure that
your application calls
WD_DriverName with your new driver
name.
-
In order to use the
WD_DriverName function, your user-mode
driver project must be built with WD_DRIVER_NAME_CHANGE
preprocessor flag (e.g. -DWD_DRIVER_NAME_CHANGE–for
Visual Studio and gcc).
The sample and generated DriverWizard Windows and Linux WinDriver
projects/makefiles already set this preprocessor flag.
PROTOTYPE
const char* DLLCALLCONV WD_DriverName(const char* sName);
PARAMETERS
DESCRIPTION
RETURN VALUE
Returns the selected driver name on success; returns NULL on failure (e.g. if
the function is called twice from the same application).
REMARKS
-
The ability to rename the WinDriver kernel module is supported on
Windows and Linux, as explained in
section 12.2.
On Windows CE, always call the WD_DriverName function
with the default WinDriver kernel module name (windrvr6),
or refrain from calling the function altogether.