BOOL
DrvLoadKernelDriver(
PREG_ACCESS RegAccess
);
The DrvLoadKernelDriver function loads and starts the kernel-mode driver.
Parameters
RegAccess
Pointer to a globally-defined structure of type REG_ACCESS.
Return Value
Returns TRUE if the operation succeeds. Otherwise returns FALSE. To obtain an error code value, call GetLastError. which is described in the Win32 SDK.
Comments
The structure pointed to by RegAccess must be a single, globally-defined REG_ACCESS structure that the driver uses with all calls to drvlib.lib functions requiring a RegAccess parameter.
The function sets the kernel-mode driver service’s start type to SERVICE_SYSTEM_START, so it will automatically reload and restart when the system is restarted. (For more information, ChangeServiceConfig in the Win32 SDK.)
Drivers must call DrvCreateServicesNode before calling DrvLoadKernelDriver.
For additional information, see Installing and Configuring your Driver, Using drvlib.lib.