diff --git a/reactos/apps/utils/driver/load/load.c b/reactos/apps/utils/driver/load/load.c index 61aaa89ca73..3b18003f1b1 100644 --- a/reactos/apps/utils/driver/load/load.c +++ b/reactos/apps/utils/driver/load/load.c @@ -1,32 +1,32 @@ -/* - * Load a device driver - */ -#include -#include - -int -main(int argc, char *argv[]) -{ - NTSTATUS Status; - UNICODE_STRING ServiceName; - - if (argc != 2) - { - printf("Usage: load \n"); - return 0; - } - ServiceName.Length = (strlen(argv[1]) + 52) * sizeof(WCHAR); - ServiceName.Buffer = (LPWSTR)malloc(ServiceName.Length + sizeof(UNICODE_NULL)); - wsprintf(ServiceName.Buffer, - L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%S", - argv[1]); - wprintf(L"%s %d %d\n", ServiceName.Buffer, ServiceName.Length, wcslen(ServiceName.Buffer)); - Status = NtLoadDriver(&ServiceName); - free(ServiceName.Buffer); - if (!NT_SUCCESS(Status)) - { - printf("Failed: %X\n", Status); - return 1; - } - return 0; -} +/* + * Load a device driver + */ +#include +#include + +int +main(int argc, char *argv[]) +{ + NTSTATUS Status; + UNICODE_STRING ServiceName; + + if (argc != 2) + { + printf("Usage: load \n"); + return 0; + } + ServiceName.Length = (strlen(argv[1]) + 52) * sizeof(WCHAR); + ServiceName.Buffer = (LPWSTR)malloc(ServiceName.Length + sizeof(UNICODE_NULL)); + wsprintf(ServiceName.Buffer, + L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%S", + argv[1]); + wprintf(L"%s %d %d\n", ServiceName.Buffer, ServiceName.Length, wcslen(ServiceName.Buffer)); + Status = NtLoadDriver(&ServiceName); + free(ServiceName.Buffer); + if (!NT_SUCCESS(Status)) + { + printf("Failed: %X\n", Status); + return 1; + } + return 0; +} diff --git a/reactos/apps/utils/driver/unload/unload.c b/reactos/apps/utils/driver/unload/unload.c index 09f8225a0f1..3e843d4e078 100644 --- a/reactos/apps/utils/driver/unload/unload.c +++ b/reactos/apps/utils/driver/unload/unload.c @@ -1,32 +1,32 @@ -/* - * Unload a device driver - */ -#include -#include - -int -main(int argc, char *argv[]) -{ - NTSTATUS Status; - UNICODE_STRING ServiceName; - - if (argc != 2) - { - printf("Usage: unload \n"); - return 0; - } - ServiceName.Length = (strlen(argv[1]) + 52) * sizeof(WCHAR); - ServiceName.Buffer = (LPWSTR)malloc(ServiceName.Length + sizeof(UNICODE_NULL)); - wsprintf(ServiceName.Buffer, - L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%S", - argv[1]); - wprintf(L"%s %d %d\n", ServiceName.Buffer, ServiceName.Length, wcslen(ServiceName.Buffer)); - Status = NtUnloadDriver(&ServiceName); - free(ServiceName.Buffer); - if (!NT_SUCCESS(Status)) - { - printf("Failed: %X\n", Status); - return 1; - } - return 0; -} +/* + * Unload a device driver + */ +#include +#include + +int +main(int argc, char *argv[]) +{ + NTSTATUS Status; + UNICODE_STRING ServiceName; + + if (argc != 2) + { + printf("Usage: unload \n"); + return 0; + } + ServiceName.Length = (strlen(argv[1]) + 52) * sizeof(WCHAR); + ServiceName.Buffer = (LPWSTR)malloc(ServiceName.Length + sizeof(UNICODE_NULL)); + wsprintf(ServiceName.Buffer, + L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%S", + argv[1]); + wprintf(L"%s %d %d\n", ServiceName.Buffer, ServiceName.Length, wcslen(ServiceName.Buffer)); + Status = NtUnloadDriver(&ServiceName); + free(ServiceName.Buffer); + if (!NT_SUCCESS(Status)) + { + printf("Failed: %X\n", Status); + return 1; + } + return 0; +}