mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Filip Navara <xnavara@volny.cz>: Use correct service name in IopInitializeDriverModule
svn path=/trunk/; revision=14589
This commit is contained in:
parent
298503a6e4
commit
4b77a4d92d
4 changed files with 17 additions and 8 deletions
|
@ -491,6 +491,7 @@ NTSTATUS FASTCALL
|
|||
IopInitializeDriverModule(
|
||||
IN PDEVICE_NODE DeviceNode,
|
||||
IN PMODULE_OBJECT ModuleObject,
|
||||
IN PUNICODE_STRING ServiceName,
|
||||
IN BOOLEAN FileSystemDriver,
|
||||
OUT PDRIVER_OBJECT *DriverObject);
|
||||
|
||||
|
|
|
@ -511,6 +511,9 @@ IopLoadServiceModule(
|
|||
* Module object representing the driver. It can be retrieve by
|
||||
* IopLoadServiceModule.
|
||||
*
|
||||
* ServiceName
|
||||
* Name of the service (as in registry).
|
||||
*
|
||||
* FileSystemDriver
|
||||
* Set to TRUE for file system drivers.
|
||||
*
|
||||
|
@ -523,6 +526,7 @@ NTSTATUS FASTCALL
|
|||
IopInitializeDriverModule(
|
||||
IN PDEVICE_NODE DeviceNode,
|
||||
IN PMODULE_OBJECT ModuleObject,
|
||||
IN PUNICODE_STRING ServiceName,
|
||||
IN BOOLEAN FileSystemDriver,
|
||||
OUT PDRIVER_OBJECT *DriverObject)
|
||||
{
|
||||
|
@ -533,7 +537,7 @@ IopInitializeDriverModule(
|
|||
|
||||
Status = IopCreateDriverObject(
|
||||
DriverObject,
|
||||
&DeviceNode->ServiceName,
|
||||
ServiceName,
|
||||
FileSystemDriver,
|
||||
ModuleObject->Base,
|
||||
ModuleObject->Length);
|
||||
|
@ -544,14 +548,14 @@ IopInitializeDriverModule(
|
|||
return Status;
|
||||
}
|
||||
|
||||
if (DeviceNode->ServiceName.Buffer)
|
||||
if (ServiceName->Buffer)
|
||||
{
|
||||
RegistryKey.Length = DeviceNode->ServiceName.Length +
|
||||
RegistryKey.Length = ServiceName->Length +
|
||||
sizeof(ServicesKeyName) - sizeof(UNICODE_NULL);
|
||||
RegistryKey.MaximumLength = RegistryKey.Length + sizeof(UNICODE_NULL);
|
||||
RegistryKey.Buffer = ExAllocatePool(PagedPool, RegistryKey.MaximumLength);
|
||||
wcscpy(RegistryKey.Buffer, ServicesKeyName);
|
||||
wcscat(RegistryKey.Buffer, DeviceNode->ServiceName.Buffer);
|
||||
wcscat(RegistryKey.Buffer, ServiceName->Buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -613,7 +617,8 @@ IopAttachFilterDriversCallback(
|
|||
if (!NT_SUCCESS(Status))
|
||||
continue;
|
||||
|
||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, FALSE, &DriverObject);
|
||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, &ServiceName,
|
||||
FALSE, &DriverObject);
|
||||
if (!NT_SUCCESS(Status))
|
||||
continue;
|
||||
|
||||
|
@ -1165,8 +1170,8 @@ IopInitializeBuiltinDriver(
|
|||
* Initialize the driver
|
||||
*/
|
||||
|
||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, FALSE,
|
||||
&DriverObject);
|
||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject,
|
||||
&DeviceNode->ServiceName, FALSE, &DriverObject);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -1873,6 +1878,7 @@ NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
|
|||
Status = IopInitializeDriverModule(
|
||||
DeviceNode,
|
||||
ModuleObject,
|
||||
&DeviceNode->ServiceName,
|
||||
(Type == 2 /* SERVICE_FILE_SYSTEM_DRIVER */ ||
|
||||
Type == 8 /* SERVICE_RECOGNIZER_DRIVER */),
|
||||
&DriverObject);
|
||||
|
|
|
@ -595,6 +595,7 @@ IoInit2(BOOLEAN BootLog)
|
|||
Status = IopInitializeDriverModule(
|
||||
DeviceNode,
|
||||
&ModuleObject,
|
||||
&DeviceNode->ServiceName,
|
||||
TRUE,
|
||||
&DriverObject);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
|
@ -1501,7 +1501,8 @@ IopActionInitChildServices(
|
|||
Status = IopLoadServiceModule(&DeviceNode->ServiceName, &ModuleObject);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, FALSE, &DriverObject);
|
||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject,
|
||||
&DeviceNode->ServiceName, FALSE, &DriverObject);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/* Attach lower level filter drivers. */
|
||||
|
|
Loading…
Reference in a new issue