mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 04:43:01 +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(
|
IopInitializeDriverModule(
|
||||||
IN PDEVICE_NODE DeviceNode,
|
IN PDEVICE_NODE DeviceNode,
|
||||||
IN PMODULE_OBJECT ModuleObject,
|
IN PMODULE_OBJECT ModuleObject,
|
||||||
|
IN PUNICODE_STRING ServiceName,
|
||||||
IN BOOLEAN FileSystemDriver,
|
IN BOOLEAN FileSystemDriver,
|
||||||
OUT PDRIVER_OBJECT *DriverObject);
|
OUT PDRIVER_OBJECT *DriverObject);
|
||||||
|
|
||||||
|
|
|
@ -511,6 +511,9 @@ IopLoadServiceModule(
|
||||||
* Module object representing the driver. It can be retrieve by
|
* Module object representing the driver. It can be retrieve by
|
||||||
* IopLoadServiceModule.
|
* IopLoadServiceModule.
|
||||||
*
|
*
|
||||||
|
* ServiceName
|
||||||
|
* Name of the service (as in registry).
|
||||||
|
*
|
||||||
* FileSystemDriver
|
* FileSystemDriver
|
||||||
* Set to TRUE for file system drivers.
|
* Set to TRUE for file system drivers.
|
||||||
*
|
*
|
||||||
|
@ -523,6 +526,7 @@ NTSTATUS FASTCALL
|
||||||
IopInitializeDriverModule(
|
IopInitializeDriverModule(
|
||||||
IN PDEVICE_NODE DeviceNode,
|
IN PDEVICE_NODE DeviceNode,
|
||||||
IN PMODULE_OBJECT ModuleObject,
|
IN PMODULE_OBJECT ModuleObject,
|
||||||
|
IN PUNICODE_STRING ServiceName,
|
||||||
IN BOOLEAN FileSystemDriver,
|
IN BOOLEAN FileSystemDriver,
|
||||||
OUT PDRIVER_OBJECT *DriverObject)
|
OUT PDRIVER_OBJECT *DriverObject)
|
||||||
{
|
{
|
||||||
|
@ -533,7 +537,7 @@ IopInitializeDriverModule(
|
||||||
|
|
||||||
Status = IopCreateDriverObject(
|
Status = IopCreateDriverObject(
|
||||||
DriverObject,
|
DriverObject,
|
||||||
&DeviceNode->ServiceName,
|
ServiceName,
|
||||||
FileSystemDriver,
|
FileSystemDriver,
|
||||||
ModuleObject->Base,
|
ModuleObject->Base,
|
||||||
ModuleObject->Length);
|
ModuleObject->Length);
|
||||||
|
@ -544,14 +548,14 @@ IopInitializeDriverModule(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DeviceNode->ServiceName.Buffer)
|
if (ServiceName->Buffer)
|
||||||
{
|
{
|
||||||
RegistryKey.Length = DeviceNode->ServiceName.Length +
|
RegistryKey.Length = ServiceName->Length +
|
||||||
sizeof(ServicesKeyName) - sizeof(UNICODE_NULL);
|
sizeof(ServicesKeyName) - sizeof(UNICODE_NULL);
|
||||||
RegistryKey.MaximumLength = RegistryKey.Length + sizeof(UNICODE_NULL);
|
RegistryKey.MaximumLength = RegistryKey.Length + sizeof(UNICODE_NULL);
|
||||||
RegistryKey.Buffer = ExAllocatePool(PagedPool, RegistryKey.MaximumLength);
|
RegistryKey.Buffer = ExAllocatePool(PagedPool, RegistryKey.MaximumLength);
|
||||||
wcscpy(RegistryKey.Buffer, ServicesKeyName);
|
wcscpy(RegistryKey.Buffer, ServicesKeyName);
|
||||||
wcscat(RegistryKey.Buffer, DeviceNode->ServiceName.Buffer);
|
wcscat(RegistryKey.Buffer, ServiceName->Buffer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -613,7 +617,8 @@ IopAttachFilterDriversCallback(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, FALSE, &DriverObject);
|
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, &ServiceName,
|
||||||
|
FALSE, &DriverObject);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1165,8 +1170,8 @@ IopInitializeBuiltinDriver(
|
||||||
* Initialize the driver
|
* Initialize the driver
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, FALSE,
|
Status = IopInitializeDriverModule(DeviceNode, ModuleObject,
|
||||||
&DriverObject);
|
&DeviceNode->ServiceName, FALSE, &DriverObject);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -1873,6 +1878,7 @@ NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
|
||||||
Status = IopInitializeDriverModule(
|
Status = IopInitializeDriverModule(
|
||||||
DeviceNode,
|
DeviceNode,
|
||||||
ModuleObject,
|
ModuleObject,
|
||||||
|
&DeviceNode->ServiceName,
|
||||||
(Type == 2 /* SERVICE_FILE_SYSTEM_DRIVER */ ||
|
(Type == 2 /* SERVICE_FILE_SYSTEM_DRIVER */ ||
|
||||||
Type == 8 /* SERVICE_RECOGNIZER_DRIVER */),
|
Type == 8 /* SERVICE_RECOGNIZER_DRIVER */),
|
||||||
&DriverObject);
|
&DriverObject);
|
||||||
|
|
|
@ -595,6 +595,7 @@ IoInit2(BOOLEAN BootLog)
|
||||||
Status = IopInitializeDriverModule(
|
Status = IopInitializeDriverModule(
|
||||||
DeviceNode,
|
DeviceNode,
|
||||||
&ModuleObject,
|
&ModuleObject,
|
||||||
|
&DeviceNode->ServiceName,
|
||||||
TRUE,
|
TRUE,
|
||||||
&DriverObject);
|
&DriverObject);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
|
@ -1501,7 +1501,8 @@ IopActionInitChildServices(
|
||||||
Status = IopLoadServiceModule(&DeviceNode->ServiceName, &ModuleObject);
|
Status = IopLoadServiceModule(&DeviceNode->ServiceName, &ModuleObject);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, FALSE, &DriverObject);
|
Status = IopInitializeDriverModule(DeviceNode, ModuleObject,
|
||||||
|
&DeviceNode->ServiceName, FALSE, &DriverObject);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* Attach lower level filter drivers. */
|
/* Attach lower level filter drivers. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue