DriverEntry for Multimedia Drivers
NTSTATUS
DriverEntry(
PDRIVER_OBJECT pDriverObject,
PUNICODE_STRING RegistryPathName
);
The DriverEntry function is a kernel-mode driver’s entry point. For kernel-mode multimedia drivers, the DriverEntry function’s two parameters are defined as shown. (Other types of kernel-mode drivers might define the function’s parameters differently.)
Parameters
pDriverObject
Pointer to a DRIVER_OBJECT structure.
RegistryPathName
Pointer to the registry path that leads to the kernel-mode driver’s subkey. See the following Comments section.
Return Value
Returns STATUS_SUCCESS if initialization operations succeed. Otherwise the function returns one of the error codes defined in ntstatus.h that fail the NT_SUCCESS macro.
Comments
Windows NT calls a kernel-mode driver’s DriverEntry function immediately after it has loaded the driver.
The registry path pointed to by RegistryPathName is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\drivername, where drivername is the name that the user-mode driver specified when it installed the kernel-mode driver. Drivers use this path for storing hardware configuration parameters.
For more information about DriverEntry, see DriverEntry in Kernel-Mode Multimedia Drivers.