reactos/apps/utils/driver/load
diff -u -r1.1 -r1.2
--- load.c 25 Sep 2003 15:40:23 -0000 1.1
+++ load.c 28 Mar 2004 09:52:18 -0000 1.2
@@ -1,32 +1,32 @@
-/*
- * Load a device driver
- */
-#include <windows.h>
-#include <ntos/zw.h>
-
-int
-main(int argc, char *argv[])
-{
- NTSTATUS Status;
- UNICODE_STRING ServiceName;
-
- if (argc != 2)
- {
- printf("Usage: load <ServiceName>\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 <windows.h>
+#include <ntos/zw.h>
+
+int
+main(int argc, char *argv[])
+{
+ NTSTATUS Status;
+ UNICODE_STRING ServiceName;
+
+ if (argc != 2)
+ {
+ printf("Usage: load <ServiceName>\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;
+}
reactos/apps/utils/driver/unload
diff -u -r1.1 -r1.2
--- unload.c 25 Sep 2003 15:40:23 -0000 1.1
+++ unload.c 28 Mar 2004 09:52:18 -0000 1.2
@@ -1,32 +1,32 @@
-/*
- * Unload a device driver
- */
-#include <windows.h>
-#include <ntos/zw.h>
-
-int
-main(int argc, char *argv[])
-{
- NTSTATUS Status;
- UNICODE_STRING ServiceName;
-
- if (argc != 2)
- {
- printf("Usage: unload <ServiceName>\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 <windows.h>
+#include <ntos/zw.h>
+
+int
+main(int argc, char *argv[])
+{
+ NTSTATUS Status;
+ UNICODE_STRING ServiceName;
+
+ if (argc != 2)
+ {
+ printf("Usage: unload <ServiceName>\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;
+}