{
UNICODE_STRING InputImagePath;
+ DPRINT("Normalizing image path '%wZ' for service '%wZ'\n", ImagePath, ServiceName);
+
RtlCopyMemory(
&InputImagePath,
ImagePath,
/* Free caller's string */
ExFreePoolWithTag(InputImagePath.Buffer, TAG_RTLREGISTRY);
}
+
+ DPRINT("Normalized image path is '%wZ' for service '%wZ'\n", ImagePath, ServiceName);
return STATUS_SUCCESS;
}
}
else
{
- DPRINT("Loading module\n");
+ DPRINT("Loading module from %wZ\n", &ServiceImagePath);
Status = MmLoadSystemImage(&ServiceImagePath, NULL, NULL, 0, (PVOID)ModuleObject, &BaseAddress);
if (NT_SUCCESS(Status))
{
DPRINT("Filter Driver: %S (%wZ)\n", Filters, &DeviceNode->InstancePath);
ServiceName.Buffer = Filters;
ServiceName.MaximumLength =
- ServiceName.Length = wcslen(Filters) * sizeof(WCHAR);
+ ServiceName.Length = (USHORT)wcslen(Filters) * sizeof(WCHAR);
/* Load and initialize the filter driver */
Status = IopLoadServiceModule(&ServiceName, &ModuleObject);
FileExtension = wcsrchr(ServiceName.Buffer, '.');
if (FileExtension != NULL)
{
- ServiceName.Length -= wcslen(FileExtension) * sizeof(WCHAR);
+ ServiceName.Length -= (USHORT)wcslen(FileExtension) * sizeof(WCHAR);
FileExtension[0] = 0;
}
* Construct the driver object name
*/
- ObjectName.Length = (wcslen(Start) + 8) * sizeof(WCHAR);
+ ObjectName.Length = ((USHORT)wcslen(Start) + 8) * sizeof(WCHAR);
ObjectName.MaximumLength = ObjectName.Length + sizeof(WCHAR);
ObjectName.Buffer = ExAllocatePool(PagedPool, ObjectName.MaximumLength);
if (!ObjectName.Buffer) return STATUS_INSUFFICIENT_RESOURCES;
* Load the driver module
*/
+ DPRINT("Loading module from %wZ\n", &ImagePath);
Status = MmLoadSystemImage(&ImagePath, NULL, NULL, 0, (PVOID)&ModuleObject, &BaseAddress);
if (!NT_SUCCESS(Status) && Status != STATUS_IMAGE_ALREADY_LOADED)
(VOID)KeSetEvent(&LoadParams->Event, 0, FALSE);
return;
}
-
+
/* Initialize and start device */
IopInitializeDevice(DeviceNode, DriverObject);
Status = IopStartDevice(DeviceNode);