mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- Fill in the DriverBase and DriverSize fields in the DRIVER_OBJECT structure.
svn path=/trunk/; revision=5816
This commit is contained in:
parent
659245c76a
commit
1c8b6bc99e
6 changed files with 38 additions and 17 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: io.h,v 1.33 2003/08/14 18:30:28 silverblade Exp $
|
||||
/* $Id: io.h,v 1.34 2003/08/24 11:35:41 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -267,13 +267,17 @@ IopLoadBootStartDrivers(VOID);
|
|||
NTSTATUS
|
||||
IopCreateDriverObject(PDRIVER_OBJECT *DriverObject,
|
||||
PUNICODE_STRING ServiceName,
|
||||
BOOLEAN FileSystemDriver);
|
||||
BOOLEAN FileSystemDriver,
|
||||
PVOID DriverImageStart,
|
||||
ULONG DriverImageSize);
|
||||
NTSTATUS
|
||||
IopInitializeDeviceNodeService(PDEVICE_NODE DeviceNode);
|
||||
NTSTATUS
|
||||
IopInitializeDriver(PDRIVER_INITIALIZE DriverEntry,
|
||||
PDEVICE_NODE DeviceNode,
|
||||
BOOLEAN FileSystemDriver);
|
||||
BOOLEAN FileSystemDriver,
|
||||
PVOID DriverImageStart,
|
||||
ULONG DriverImageSize);
|
||||
VOID
|
||||
IoInitCancelHandling(VOID);
|
||||
VOID
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: device.c,v 1.57 2003/07/21 21:53:51 royce Exp $
|
||||
/* $Id: device.c,v 1.58 2003/08/24 11:35:41 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -276,7 +276,9 @@ IopDefaultDispatchFunction(PDEVICE_OBJECT DeviceObject,
|
|||
NTSTATUS
|
||||
IopCreateDriverObject(PDRIVER_OBJECT *DriverObject,
|
||||
PUNICODE_STRING ServiceName,
|
||||
BOOLEAN FileSystem)
|
||||
BOOLEAN FileSystem,
|
||||
PVOID DriverImageStart,
|
||||
ULONG DriverImageSize)
|
||||
{
|
||||
PDRIVER_OBJECT Object;
|
||||
HANDLE DriverHandle = 0;
|
||||
|
@ -286,7 +288,8 @@ IopCreateDriverObject(PDRIVER_OBJECT *DriverObject,
|
|||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT("IopCreateDriverObject(%p '%wZ' %x)\n", DriverObject, ServiceName, FileSystem);
|
||||
DPRINT("IopCreateDriverObject(%p '%wZ' %x %p %x)\n", DriverObject, ServiceName, FileSystem,
|
||||
DriverImageStart, DriverImageSize);
|
||||
|
||||
*DriverObject = NULL;
|
||||
|
||||
|
@ -339,6 +342,9 @@ IopCreateDriverObject(PDRIVER_OBJECT *DriverObject,
|
|||
|
||||
Object->Type = InternalDriverType;
|
||||
|
||||
Object->DriverStart = DriverImageStart;
|
||||
Object->DriverSize = DriverImageSize;
|
||||
|
||||
for (i=0; i<=IRP_MJ_MAXIMUM_FUNCTION; i++)
|
||||
{
|
||||
Object->MajorFunction[i] = (PDRIVER_DISPATCH) IopDefaultDispatchFunction;
|
||||
|
@ -465,7 +471,8 @@ IopInitializeService(
|
|||
return(Status);
|
||||
}
|
||||
|
||||
Status = IopInitializeDriver(ModuleObject->EntryPoint, DeviceNode, FALSE);
|
||||
Status = IopInitializeDriver(ModuleObject->EntryPoint, DeviceNode, FALSE,
|
||||
ModuleObject->Base, ModuleObject->Length);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
LdrUnloadModule(ModuleObject);
|
||||
|
@ -532,7 +539,9 @@ IopInitializeDeviceNodeService(PDEVICE_NODE DeviceNode)
|
|||
NTSTATUS
|
||||
IopInitializeDriver(PDRIVER_INITIALIZE DriverEntry,
|
||||
PDEVICE_NODE DeviceNode,
|
||||
BOOLEAN FileSystemDriver)
|
||||
BOOLEAN FileSystemDriver,
|
||||
PVOID DriverImageStart,
|
||||
ULONG DriverImageSize)
|
||||
/*
|
||||
* FUNCTION: Called to initalize a loaded driver
|
||||
* ARGUMENTS:
|
||||
|
@ -550,7 +559,9 @@ IopInitializeDriver(PDRIVER_INITIALIZE DriverEntry,
|
|||
|
||||
Status = IopCreateDriverObject(&DriverObject,
|
||||
&DeviceNode->ServiceName,
|
||||
FileSystemDriver);
|
||||
FileSystemDriver,
|
||||
DriverImageStart,
|
||||
DriverImageSize);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(Status);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: driver.c,v 1.14 2003/07/11 01:23:14 royce Exp $
|
||||
/* $Id: driver.c,v 1.15 2003/08/24 11:35:41 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -222,7 +222,9 @@ NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
|
|||
|
||||
Status = IopInitializeDriver(ModuleObject->EntryPoint,
|
||||
DeviceNode,
|
||||
(Type == 2 || Type == 8));
|
||||
(Type == 2 || Type == 8),
|
||||
ModuleObject->Base,
|
||||
ModuleObject->Length);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("IopInitializeDriver() failed (Status %lx)\n", Status);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: iomgr.c,v 1.36 2003/07/11 01:23:14 royce Exp $
|
||||
/* $Id: iomgr.c,v 1.37 2003/08/24 11:35:41 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -373,7 +373,9 @@ VOID IoInit2(VOID)
|
|||
|
||||
Status = IopInitializeDriver(RawFsDriverEntry,
|
||||
DeviceNode,
|
||||
TRUE);
|
||||
TRUE,
|
||||
NULL,
|
||||
0);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
IopFreeDeviceNode(DeviceNode);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: pnpmgr.c,v 1.13 2003/07/21 21:53:51 royce Exp $
|
||||
/* $Id: pnpmgr.c,v 1.14 2003/08/24 11:35:41 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -1233,7 +1233,7 @@ VOID PnpInit(VOID)
|
|||
|
||||
KeInitializeSpinLock(&IopDeviceTreeLock);
|
||||
|
||||
Status = IopCreateDriverObject(&IopRootDriverObject, NULL, FALSE);
|
||||
Status = IopCreateDriverObject(&IopRootDriverObject, NULL, FALSE, NULL, 0);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
CPRINT("IoCreateDriverObject() failed\n");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: loader.c,v 1.133 2003/07/21 21:53:52 royce Exp $
|
||||
/* $Id: loader.c,v 1.134 2003/08/24 11:35:41 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -538,7 +538,9 @@ LdrInitializeBootStartDriver(PVOID ModuleLoadBase,
|
|||
RtlCreateUnicodeString(&DeviceNode->ServiceName, Buffer);
|
||||
|
||||
Status = IopInitializeDriver(ModuleObject->EntryPoint,
|
||||
DeviceNode, FALSE);
|
||||
DeviceNode, FALSE,
|
||||
ModuleObject->Base,
|
||||
ModuleObject->Length);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
IopFreeDeviceNode(DeviceNode);
|
||||
|
|
Loading…
Reference in a new issue