Initial revision
[reactos.git] / reactos / ntoskrnl / io / iomgr.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/io/iomgr.c
5 * PURPOSE: Initializes the io manager
6 * PROGRAMMER: David Welch (welch@mcmail.com)
7 * REVISION HISTORY:
8 * 29/07/98: Created
9 */
10
11 /* INCLUDES ****************************************************************/
12
13 #include <windows.h>
14 #include <ddk/ntddk.h>
15 #include <internal/kernel.h>
16 #include <internal/objmgr.h>
17
18 /* GLOBALS *******************************************************************/
19
20 OBJECT_TYPE DeviceObjectType = {{NULL,0,0},
21 0,
22 0,
23 ULONG_MAX,
24 ULONG_MAX,
25 sizeof(DEVICE_OBJECT),
26 0,
27 NULL,
28 NULL,
29 NULL,
30 NULL,
31 NULL,
32 NULL,
33 NULL,
34 NULL,
35 };
36
37
38 /* FUNCTIONS ****************************************************************/
39
40 VOID IoInit(VOID)
41 {
42 OBJECT_ATTRIBUTES attr;
43 HANDLE handle;
44 UNICODE_STRING string;
45 ANSI_STRING astring;
46
47 ObRegisterType(OBJTYP_DEVICE,&DeviceObjectType);
48
49 RtlInitAnsiString(&astring,"\\Device");
50 RtlAnsiStringToUnicodeString(&string,&astring,TRUE);
51 InitializeObjectAttributes(&attr,&string,0,NULL,NULL);
52 ZwCreateDirectoryObject(&handle,0,&attr);
53
54 IoInitCancelHandling();
55 }