[httpdisk] Store the driver object as HttpdiskDriverObj
authorShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Sat, 8 Jan 2011 00:22:57 +0000 (19:22 -0500)
committerShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Sat, 8 Jan 2011 00:22:57 +0000 (19:22 -0500)
src/httpdisk/bus.c
src/httpdisk/httpdisk.c

index c4fd61f..9b2e3cc 100644 (file)
@@ -30,6 +30,9 @@
 #include "debug.h"
 #include "dummy.h"
 
+/** From httpdisk.c */
+extern PDRIVER_OBJECT HttpdiskDriverObj;
+
 /** Exports. */
 NTSTATUS STDCALL HttpdiskBusEstablish(void);
 VOID HttpdiskBusCleanup(void);
index eec3bf6..2a2bd84 100644 (file)
@@ -128,6 +128,7 @@ extern DRIVER_ADD_DEVICE HttpdiskBusAttach;
 #define BUFFER_SIZE             (4096 * 4)
 
 HANDLE dir_handle;
+PDRIVER_OBJECT HttpdiskDriverObj = NULL;
 
 typedef struct _HTTP_HEADER {
     LARGE_INTEGER ContentLength;
@@ -264,6 +265,8 @@ DriverEntry (
     ULONG                       n;
     USHORT                      n_created_devices;
 
+    HttpdiskDriverObj = DriverObject;
+
     parameter_path.Length = 0;
 
     parameter_path.MaximumLength = RegistryPath->Length + sizeof(PARAMETER_KEY);