mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:13:06 +00:00
[NTOS:FORMATTING]
- Try to fix indentation in iomgr/driver.c. Whitespace changes only svn path=/trunk/; revision=64931
This commit is contained in:
parent
5892b26e03
commit
863c3c8c19
1 changed files with 649 additions and 643 deletions
|
@ -39,7 +39,8 @@ PLIST_ENTRY IopGroupTable;
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS **********************************************************/
|
/* PRIVATE FUNCTIONS **********************************************************/
|
||||||
|
|
||||||
NTSTATUS NTAPI
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
IopInvalidDeviceRequest(
|
IopInvalidDeviceRequest(
|
||||||
PDEVICE_OBJECT DeviceObject,
|
PDEVICE_OBJECT DeviceObject,
|
||||||
PIRP Irp)
|
PIRP Irp)
|
||||||
|
@ -64,8 +65,7 @@ IopDeleteDriver(IN PVOID ObjectBody)
|
||||||
ASSERT(!DriverObject->DeviceObject);
|
ASSERT(!DriverObject->DeviceObject);
|
||||||
|
|
||||||
/* Get the extension and loop them */
|
/* Get the extension and loop them */
|
||||||
DriverExtension = IoGetDrvObjExtension(DriverObject)->
|
DriverExtension = IoGetDrvObjExtension(DriverObject)->ClientDriverExtension;
|
||||||
ClientDriverExtension;
|
|
||||||
while (DriverExtension)
|
while (DriverExtension)
|
||||||
{
|
{
|
||||||
/* Get the next one */
|
/* Get the next one */
|
||||||
|
@ -98,7 +98,8 @@ IopDeleteDriver(IN PVOID ObjectBody)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS FASTCALL
|
NTSTATUS
|
||||||
|
FASTCALL
|
||||||
IopGetDriverObject(
|
IopGetDriverObject(
|
||||||
PDRIVER_OBJECT *DriverObject,
|
PDRIVER_OBJECT *DriverObject,
|
||||||
PUNICODE_STRING ServiceName,
|
PUNICODE_STRING ServiceName,
|
||||||
|
@ -132,8 +133,7 @@ IopGetDriverObject(
|
||||||
DPRINT("Driver name: '%wZ'\n", &DriverName);
|
DPRINT("Driver name: '%wZ'\n", &DriverName);
|
||||||
|
|
||||||
/* Open driver object */
|
/* Open driver object */
|
||||||
Status = ObReferenceObjectByName(
|
Status = ObReferenceObjectByName(&DriverName,
|
||||||
&DriverName,
|
|
||||||
OBJ_OPENIF | OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE, /* Attributes */
|
OBJ_OPENIF | OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE, /* Attributes */
|
||||||
NULL, /* PassedAccessState */
|
NULL, /* PassedAccessState */
|
||||||
0, /* DesiredAccess */
|
0, /* DesiredAccess */
|
||||||
|
@ -141,7 +141,6 @@ IopGetDriverObject(
|
||||||
KernelMode,
|
KernelMode,
|
||||||
NULL, /* ParseContext */
|
NULL, /* ParseContext */
|
||||||
(PVOID*)&Object);
|
(PVOID*)&Object);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Failed to reference driver object, status=0x%08x\n", Status);
|
DPRINT("Failed to reference driver object, status=0x%08x\n", Status);
|
||||||
|
@ -193,7 +192,6 @@ IopSuffixUnicodeString(
|
||||||
*
|
*
|
||||||
* Display 'Loading XXX...' message.
|
* Display 'Loading XXX...' message.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
|
@ -234,7 +232,6 @@ IopDisplayLoadingMessage(PUNICODE_STRING ServiceName)
|
||||||
* Remarks
|
* Remarks
|
||||||
* The input image path isn't freed on error.
|
* The input image path isn't freed on error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IopNormalizeImagePath(
|
IopNormalizeImagePath(
|
||||||
|
@ -246,8 +243,7 @@ IopNormalizeImagePath(
|
||||||
|
|
||||||
DPRINT("Normalizing image path '%wZ' for service '%wZ'\n", ImagePath, ServiceName);
|
DPRINT("Normalizing image path '%wZ' for service '%wZ'\n", ImagePath, ServiceName);
|
||||||
|
|
||||||
RtlCopyMemory(
|
RtlCopyMemory(&InputImagePath,
|
||||||
&InputImagePath,
|
|
||||||
ImagePath,
|
ImagePath,
|
||||||
sizeof(UNICODE_STRING));
|
sizeof(UNICODE_STRING));
|
||||||
|
|
||||||
|
@ -256,20 +252,22 @@ IopNormalizeImagePath(
|
||||||
ImagePath->Length = 0;
|
ImagePath->Length = 0;
|
||||||
ImagePath->MaximumLength =
|
ImagePath->MaximumLength =
|
||||||
(33 * sizeof(WCHAR)) + ServiceName->Length + sizeof(UNICODE_NULL);
|
(33 * sizeof(WCHAR)) + ServiceName->Length + sizeof(UNICODE_NULL);
|
||||||
ImagePath->Buffer = ExAllocatePool(NonPagedPool, ImagePath->MaximumLength);
|
ImagePath->Buffer = ExAllocatePool(NonPagedPool,
|
||||||
|
ImagePath->MaximumLength);
|
||||||
if (ImagePath->Buffer == NULL)
|
if (ImagePath->Buffer == NULL)
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
|
|
||||||
RtlAppendUnicodeToString(ImagePath, L"\\SystemRoot\\system32\\drivers\\");
|
RtlAppendUnicodeToString(ImagePath, L"\\SystemRoot\\system32\\drivers\\");
|
||||||
RtlAppendUnicodeStringToString(ImagePath, ServiceName);
|
RtlAppendUnicodeStringToString(ImagePath, ServiceName);
|
||||||
RtlAppendUnicodeToString(ImagePath, L".sys");
|
RtlAppendUnicodeToString(ImagePath, L".sys");
|
||||||
} else
|
}
|
||||||
if (InputImagePath.Buffer[0] != L'\\')
|
else if (InputImagePath.Buffer[0] != L'\\')
|
||||||
{
|
{
|
||||||
ImagePath->Length = 0;
|
ImagePath->Length = 0;
|
||||||
ImagePath->MaximumLength =
|
ImagePath->MaximumLength =
|
||||||
12 * sizeof(WCHAR) + InputImagePath.Length + sizeof(UNICODE_NULL);
|
12 * sizeof(WCHAR) + InputImagePath.Length + sizeof(UNICODE_NULL);
|
||||||
ImagePath->Buffer = ExAllocatePool(NonPagedPool, ImagePath->MaximumLength);
|
ImagePath->Buffer = ExAllocatePool(NonPagedPool,
|
||||||
|
ImagePath->MaximumLength);
|
||||||
if (ImagePath->Buffer == NULL)
|
if (ImagePath->Buffer == NULL)
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
|
|
||||||
|
@ -297,8 +295,8 @@ IopNormalizeImagePath(
|
||||||
* Return Value
|
* Return Value
|
||||||
* Status
|
* Status
|
||||||
*/
|
*/
|
||||||
|
NTSTATUS
|
||||||
NTSTATUS FASTCALL
|
FASTCALL
|
||||||
IopLoadServiceModule(
|
IopLoadServiceModule(
|
||||||
IN PUNICODE_STRING ServiceName,
|
IN PUNICODE_STRING ServiceName,
|
||||||
OUT PLDR_DATA_TABLE_ENTRY *ModuleObject)
|
OUT PLDR_DATA_TABLE_ENTRY *ModuleObject)
|
||||||
|
@ -350,7 +348,6 @@ IopLoadServiceModule(
|
||||||
/*
|
/*
|
||||||
* Get information about the service.
|
* Get information about the service.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RtlZeroMemory(QueryTable, sizeof(QueryTable));
|
RtlZeroMemory(QueryTable, sizeof(QueryTable));
|
||||||
|
|
||||||
RtlInitUnicodeString(&ServiceImagePath, NULL);
|
RtlInitUnicodeString(&ServiceImagePath, NULL);
|
||||||
|
@ -364,7 +361,10 @@ IopLoadServiceModule(
|
||||||
QueryTable[1].EntryContext = &ServiceImagePath;
|
QueryTable[1].EntryContext = &ServiceImagePath;
|
||||||
|
|
||||||
Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE,
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE,
|
||||||
(PWSTR)ServiceKey, QueryTable, NULL, NULL);
|
(PWSTR)ServiceKey,
|
||||||
|
QueryTable,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
ZwClose(ServiceKey);
|
ZwClose(ServiceKey);
|
||||||
ZwClose(CCSKey);
|
ZwClose(CCSKey);
|
||||||
|
@ -379,7 +379,6 @@ IopLoadServiceModule(
|
||||||
/*
|
/*
|
||||||
* Normalize the image path for all later processing.
|
* Normalize the image path for all later processing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Status = IopNormalizeImagePath(&ServiceImagePath, ServiceName);
|
Status = IopNormalizeImagePath(&ServiceImagePath, ServiceName);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -391,7 +390,6 @@ IopLoadServiceModule(
|
||||||
/*
|
/*
|
||||||
* Case for disabled drivers
|
* Case for disabled drivers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ServiceStart >= 4)
|
if (ServiceStart >= 4)
|
||||||
{
|
{
|
||||||
/* We can't load this */
|
/* We can't load this */
|
||||||
|
@ -412,7 +410,6 @@ IopLoadServiceModule(
|
||||||
/*
|
/*
|
||||||
* Now check if the module was loaded successfully.
|
* Now check if the module was loaded successfully.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Module loading failed (Status %x)\n", Status);
|
DPRINT("Module loading failed (Status %x)\n", Status);
|
||||||
|
@ -450,8 +447,8 @@ MmFreeDriverInitialization(IN PLDR_DATA_TABLE_ENTRY LdrEntry);
|
||||||
* On successful return this contains the driver object representing
|
* On successful return this contains the driver object representing
|
||||||
* the loaded driver.
|
* the loaded driver.
|
||||||
*/
|
*/
|
||||||
|
NTSTATUS
|
||||||
NTSTATUS FASTCALL
|
FASTCALL
|
||||||
IopInitializeDriverModule(
|
IopInitializeDriverModule(
|
||||||
IN PDEVICE_NODE DeviceNode,
|
IN PDEVICE_NODE DeviceNode,
|
||||||
IN PLDR_DATA_TABLE_ENTRY ModuleObject,
|
IN PLDR_DATA_TABLE_ENTRY ModuleObject,
|
||||||
|
@ -504,8 +501,7 @@ IopInitializeDriverModule(
|
||||||
else
|
else
|
||||||
DriverName.Length = 0;
|
DriverName.Length = 0;
|
||||||
|
|
||||||
Status = IopCreateDriver(
|
Status = IopCreateDriver(DriverName.Length > 0 ? &DriverName : NULL,
|
||||||
DriverName.Length > 0 ? &DriverName : NULL,
|
|
||||||
DriverEntry,
|
DriverEntry,
|
||||||
&RegistryKey,
|
&RegistryKey,
|
||||||
ServiceName,
|
ServiceName,
|
||||||
|
@ -535,8 +531,8 @@ IopInitializeDriverModule(
|
||||||
*
|
*
|
||||||
* Internal routine used by IopAttachFilterDrivers.
|
* Internal routine used by IopAttachFilterDrivers.
|
||||||
*/
|
*/
|
||||||
|
NTSTATUS
|
||||||
NTSTATUS NTAPI
|
NTAPI
|
||||||
IopAttachFilterDriversCallback(
|
IopAttachFilterDriversCallback(
|
||||||
PWSTR ValueName,
|
PWSTR ValueName,
|
||||||
ULONG ValueType,
|
ULONG ValueType,
|
||||||
|
@ -577,8 +573,11 @@ IopAttachFilterDriversCallback(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
Status = IopInitializeDriverModule(DeviceNode, ModuleObject, &ServiceName,
|
Status = IopInitializeDriverModule(DeviceNode,
|
||||||
FALSE, &DriverObject);
|
ModuleObject,
|
||||||
|
&ServiceName,
|
||||||
|
FALSE,
|
||||||
|
&DriverObject);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -605,8 +604,8 @@ IopAttachFilterDriversCallback(
|
||||||
* Set to TRUE for loading lower level filters or FALSE for upper
|
* Set to TRUE for loading lower level filters or FALSE for upper
|
||||||
* level filters.
|
* level filters.
|
||||||
*/
|
*/
|
||||||
|
NTSTATUS
|
||||||
NTSTATUS FASTCALL
|
FASTCALL
|
||||||
IopAttachFilterDrivers(
|
IopAttachFilterDrivers(
|
||||||
PDEVICE_NODE DeviceNode,
|
PDEVICE_NODE DeviceNode,
|
||||||
BOOLEAN Lower)
|
BOOLEAN Lower)
|
||||||
|
@ -619,8 +618,10 @@ IopAttachFilterDrivers(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
/* Open enumeration root key */
|
/* Open enumeration root key */
|
||||||
Status = IopOpenRegistryKeyEx(&EnumRootKey, NULL,
|
Status = IopOpenRegistryKeyEx(&EnumRootKey,
|
||||||
&EnumRoot, KEY_READ);
|
NULL,
|
||||||
|
&EnumRoot,
|
||||||
|
KEY_READ);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
|
DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
|
||||||
|
@ -628,8 +629,10 @@ IopAttachFilterDrivers(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open subkey */
|
/* Open subkey */
|
||||||
Status = IopOpenRegistryKeyEx(&SubKey, EnumRootKey,
|
Status = IopOpenRegistryKeyEx(&SubKey,
|
||||||
&DeviceNode->InstancePath, KEY_READ);
|
EnumRootKey,
|
||||||
|
&DeviceNode->InstancePath,
|
||||||
|
KEY_READ);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
|
DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
|
||||||
|
@ -648,8 +651,7 @@ IopAttachFilterDrivers(
|
||||||
QueryTable[0].Flags = 0;
|
QueryTable[0].Flags = 0;
|
||||||
QueryTable[0].DefaultType = REG_NONE;
|
QueryTable[0].DefaultType = REG_NONE;
|
||||||
|
|
||||||
Status = RtlQueryRegistryValues(
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE,
|
||||||
RTL_REGISTRY_HANDLE,
|
|
||||||
(PWSTR)SubKey,
|
(PWSTR)SubKey,
|
||||||
QueryTable,
|
QueryTable,
|
||||||
DeviceNode,
|
DeviceNode,
|
||||||
|
@ -674,8 +676,7 @@ IopAttachFilterDrivers(
|
||||||
QueryTable[0].EntryContext = &Class;
|
QueryTable[0].EntryContext = &Class;
|
||||||
QueryTable[0].Flags = RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_DIRECT;
|
QueryTable[0].Flags = RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_DIRECT;
|
||||||
|
|
||||||
Status = RtlQueryRegistryValues(
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE,
|
||||||
RTL_REGISTRY_HANDLE,
|
|
||||||
(PWSTR)SubKey,
|
(PWSTR)SubKey,
|
||||||
QueryTable,
|
QueryTable,
|
||||||
DeviceNode,
|
DeviceNode,
|
||||||
|
@ -692,8 +693,10 @@ IopAttachFilterDrivers(
|
||||||
{
|
{
|
||||||
UNICODE_STRING ControlClass = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Class");
|
UNICODE_STRING ControlClass = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Class");
|
||||||
|
|
||||||
Status = IopOpenRegistryKeyEx(&EnumRootKey, NULL,
|
Status = IopOpenRegistryKeyEx(&EnumRootKey,
|
||||||
&ControlClass, KEY_READ);
|
NULL,
|
||||||
|
&ControlClass,
|
||||||
|
KEY_READ);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
|
DPRINT1("ZwOpenKey() failed with Status %08X\n", Status);
|
||||||
|
@ -701,8 +704,10 @@ IopAttachFilterDrivers(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open subkey */
|
/* Open subkey */
|
||||||
Status = IopOpenRegistryKeyEx(&SubKey, EnumRootKey,
|
Status = IopOpenRegistryKeyEx(&SubKey,
|
||||||
&Class, KEY_READ);
|
EnumRootKey,
|
||||||
|
&Class,
|
||||||
|
KEY_READ);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* It's okay if there's no class key */
|
/* It's okay if there's no class key */
|
||||||
|
@ -720,8 +725,7 @@ IopAttachFilterDrivers(
|
||||||
QueryTable[0].Flags = 0;
|
QueryTable[0].Flags = 0;
|
||||||
QueryTable[0].DefaultType = REG_NONE;
|
QueryTable[0].DefaultType = REG_NONE;
|
||||||
|
|
||||||
Status = RtlQueryRegistryValues(
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE,
|
||||||
RTL_REGISTRY_HANDLE,
|
|
||||||
(PWSTR)SubKey,
|
(PWSTR)SubKey,
|
||||||
QueryTable,
|
QueryTable,
|
||||||
DeviceNode,
|
DeviceNode,
|
||||||
|
@ -836,7 +840,6 @@ LdrProcessDriverModule(PLDR_DATA_TABLE_ENTRY LdrEntry,
|
||||||
*
|
*
|
||||||
* Initialize a driver that is already loaded in memory.
|
* Initialize a driver that is already loaded in memory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
|
@ -886,7 +889,10 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry)
|
||||||
* Determine the right device object
|
* Determine the right device object
|
||||||
*/
|
*/
|
||||||
/* Use IopRootDeviceNode for now */
|
/* Use IopRootDeviceNode for now */
|
||||||
Status = IopCreateDeviceNode(IopRootDeviceNode, NULL, &ServiceName, &DeviceNode);
|
Status = IopCreateDeviceNode(IopRootDeviceNode,
|
||||||
|
NULL,
|
||||||
|
&ServiceName,
|
||||||
|
&DeviceNode);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status);
|
DPRINT1("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status);
|
||||||
|
@ -912,8 +918,11 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry)
|
||||||
/*
|
/*
|
||||||
* Initialize the driver
|
* Initialize the driver
|
||||||
*/
|
*/
|
||||||
Status = IopInitializeDriverModule(DeviceNode, LdrEntry,
|
Status = IopInitializeDriverModule(DeviceNode,
|
||||||
&DeviceNode->ServiceName, FALSE, &DriverObject);
|
LdrEntry,
|
||||||
|
&DeviceNode->ServiceName,
|
||||||
|
FALSE,
|
||||||
|
&DriverObject);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -1269,7 +1278,6 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
|
||||||
/*
|
/*
|
||||||
* Get path of service...
|
* Get path of service...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RtlZeroMemory(QueryTable, sizeof(QueryTable));
|
RtlZeroMemory(QueryTable, sizeof(QueryTable));
|
||||||
|
|
||||||
RtlInitUnicodeString(&ImagePath, NULL);
|
RtlInitUnicodeString(&ImagePath, NULL);
|
||||||
|
@ -1279,7 +1287,10 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
|
||||||
QueryTable[0].EntryContext = &ImagePath;
|
QueryTable[0].EntryContext = &ImagePath;
|
||||||
|
|
||||||
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
|
||||||
DriverServiceName->Buffer, QueryTable, NULL, NULL);
|
DriverServiceName->Buffer,
|
||||||
|
QueryTable,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -1291,7 +1302,6 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
|
||||||
/*
|
/*
|
||||||
* Normalize the image path for all later processing.
|
* Normalize the image path for all later processing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Status = IopNormalizeImagePath(&ImagePath, &ServiceName);
|
Status = IopNormalizeImagePath(&ImagePath, &ServiceName);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -1304,7 +1314,6 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
|
||||||
/*
|
/*
|
||||||
* Free the service path
|
* Free the service path
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ExFreePool(ImagePath.Buffer);
|
ExFreePool(ImagePath.Buffer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1927,7 +1936,6 @@ IopLoadUnloadDriver(
|
||||||
/*
|
/*
|
||||||
* Get service type.
|
* Get service type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RtlZeroMemory(&QueryTable, sizeof(QueryTable));
|
RtlZeroMemory(&QueryTable, sizeof(QueryTable));
|
||||||
|
|
||||||
RtlInitUnicodeString(&ImagePath, NULL);
|
RtlInitUnicodeString(&ImagePath, NULL);
|
||||||
|
@ -1953,7 +1961,6 @@ IopLoadUnloadDriver(
|
||||||
/*
|
/*
|
||||||
* Normalize the image path for all later processing.
|
* Normalize the image path for all later processing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Status = IopNormalizeImagePath(&ImagePath, &ServiceName);
|
Status = IopNormalizeImagePath(&ImagePath, &ServiceName);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -1978,7 +1985,6 @@ IopLoadUnloadDriver(
|
||||||
/*
|
/*
|
||||||
* Load the driver module
|
* Load the driver module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DPRINT("Loading module from %wZ\n", &ImagePath);
|
DPRINT("Loading module from %wZ\n", &ImagePath);
|
||||||
Status = MmLoadSystemImage(&ImagePath, NULL, NULL, 0, (PVOID)&ModuleObject, &BaseAddress);
|
Status = MmLoadSystemImage(&ImagePath, NULL, NULL, 0, (PVOID)&ModuleObject, &BaseAddress);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue