ReactOS  0.4.15-dev-1033-gd7d716a
ntddrdsk.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * FILE: include/reactos/drivers/ntddrdsk.h
5  * PURPOSE: Constants and types for accessing the RAM disk device
6  * PROGRAMMERS: ReactOS Portable Systems Group
7  */
8 #ifndef _NTDDRDSK_H_
9 #define _NTDDRDSK_H_
10 
11 #if _MSC_VER > 1000
12 #pragma once
13 #endif
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 //
20 // This guid identifies a RAM disk volume (RamdiskBootDiskGuid)
21 // {D9B257FC-684E-4DCB-AB79-03CFA2F6B750}
22 //
23 DEFINE_GUID(RAMDISK_BOOTDISK_GUID, 0xD9B257FC, 0x684E, 0x4DCB, 0xAB, 0x79, 0x03, 0xCF, 0xA2, 0xF6, 0xB7, 0x50);
24 
25 //
26 // This guid identifies a RAM disk bus
27 // {9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}
28 //
29 DEFINE_GUID(GUID_BUS_TYPE_RAMDISK, 0x9D6D66A6, 0x0B0C, 0x4563, 0x90, 0x77, 0xA0, 0xE9, 0xA7, 0x95, 0x5A, 0xE4);
30 
31 //
32 // Device Name - this string is the name of the device. It is the name
33 // that should be passed to NtOpenFile when accessing the device.
34 //
35 // Note: For devices that support multiple units, it should be suffixed
36 // with the Ascii representation of the unit number.
37 //
38 #define DD_RAMDISK_DEVICE_NAME "\\Device\\Ramdisk"
39 #define DD_RAMDISK_DEVICE_NAME_U L"\\Device\\Ramdisk"
40 
41 //
42 // IoControlCode values for ramdisk devices.
43 //
44 #define IOCTL_RAMDISK_BASE FILE_DEVICE_VIRTUAL_DISK
45 #define FSCTL_CREATE_RAM_DISK CTL_CODE(FILE_DEVICE_VIRTUAL_DISK, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
46 
47 //
48 // Disk Types
49 //
50 #define RAMDISK_REGISTRY_DISK 1 // Loaded from the registry
51 #define RAMDISK_MEMORY_MAPPED_DISK 2 // Loaded from a file and mapped in memory
52 #define RAMDISK_BOOT_DISK 3 // Used as a boot device "ramdisk(0)"
53 #define RAMDISK_WIM_DISK 4 // Used as an installation device
54 
55 //
56 // Options when creating a ramdisk
57 //
59 {
67 
68 //
69 // This structure is passed in for a FSCTL_CREATE_RAM_DISK call
70 //
71 typedef struct _RAMDISK_CREATE_INPUT
72 {
79  union
80  {
81  struct
82  {
86  };
87  struct
88  {
91  };
93  };
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif // _NTDDRDSK_H_
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
uint32_t ULONG_PTR
Definition: typedefs.h:65
long LONG
Definition: pedump.c:60
__wchar_t WCHAR
Definition: xmlstorage.h:180
ULONG_PTR BasePage
Definition: ntddrdsk.h:89
RAMDISK_CREATE_OPTIONS Options
Definition: ntddrdsk.h:76
struct _RAMDISK_CREATE_INPUT * PRAMDISK_CREATE_INPUT
ULONG_PTR SIZE_T
Definition: typedefs.h:80
DEFINE_GUID(RAMDISK_BOOTDISK_GUID, 0xD9B257FC, 0x684E, 0x4DCB, 0xAB, 0x79, 0x03, 0xCF, 0xA2, 0xF6, 0xB7, 0x50)
struct _RAMDISK_CREATE_OPTIONS RAMDISK_CREATE_OPTIONS
unsigned int ULONG
Definition: retypes.h:1
struct _RAMDISK_CREATE_INPUT RAMDISK_CREATE_INPUT
LARGE_INTEGER DiskLength
Definition: ntddrdsk.h:77