PDRIVER_OBJECT DriverObject;
NTSTATUS Status;
PWCHAR FileNameWithoutPath;
- LPWSTR FileExtension;
+ PWSTR FileExtension;
PUNICODE_STRING ModuleName = &BootLdrEntry->BaseDllName;
PLDR_DATA_TABLE_ENTRY LdrEntry;
PLIST_ENTRY NextEntry;
return STATUS_INSUFFICIENT_RESOURCES;
}
- FileExtension = wcsrchr(ServiceName.Buffer, '.');
+ FileExtension = wcsrchr(ServiceName.Buffer, L'.');
if (FileExtension != NULL)
{
ServiceName.Length -= (USHORT)wcslen(FileExtension) * sizeof(WCHAR);
if (!NT_SUCCESS(Status))
{
DPRINT1("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status);
- return(Status);
+ return Status;
}
/* Lookup the new Ldr entry in PsLoadedModuleList */
InLoadOrderLinks);
if (RtlEqualUnicodeString(ModuleName, &LdrEntry->BaseDllName, TRUE))
{
- break;
+ break;
}
NextEntry = NextEntry->Flink;
PDEVICE_OBJECT DeviceObject;
PEXTENDED_DEVOBJ_EXTENSION DeviceExtension;
NTSTATUS Status;
- LPWSTR Start;
+ PWSTR Start;
BOOLEAN SafeToUnload = TRUE;
DPRINT("IopUnloadDriver('%wZ', %u)\n", DriverServiceName, UnloadPnpDrivers);
/*
* Get the service name from the registry key name
*/
-
Start = wcsrchr(DriverServiceName->Buffer, L'\\');
if (Start == NULL)
Start = DriverServiceName->Buffer;
/*
* Construct the driver object name
*/
-
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;
wcscpy(ObjectName.Buffer, DRIVER_ROOT_NAME);
memcpy(ObjectName.Buffer + 8, Start, ObjectName.Length - 8 * sizeof(WCHAR));
- ObjectName.Buffer[ObjectName.Length/sizeof(WCHAR)] = 0;
+ ObjectName.Buffer[ObjectName.Length/sizeof(WCHAR)] = UNICODE_NULL;
/*
* Find the driver object
return Status;
}
- /*
- * Free the buffer for driver object name
- */
+ /* Free the buffer for driver object name */
ExFreePool(ObjectName.Buffer);
/* Check that driver is not already unloading */
return Status;
}
- /*
- * Free the service path
- */
+ /* Free the service path */
ExFreePool(ImagePath.Buffer);
/*