mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[VCDROM] Implement the virtual CD-ROM class driver.
It was provided by MS as a separate package to download for Windows (up to 7). That class driver allows creating virtual drives on which we can later mount ISOs images. It's rather basic, but does the job. To use it, you can use the GUI app from Microsoft (Virtual CD-ROM Control Panel) or the vcdcli in CLI. We're compatible :-). Note that it's not loaded at boot, you need to manually start it, to lower memory footprint. Both applications will handle this for you.
This commit is contained in:
parent
63d46228b8
commit
6906e184bb
6 changed files with 1293 additions and 0 deletions
|
@ -1 +1,2 @@
|
|||
add_subdirectory(green)
|
||||
add_subdirectory(vcdrom)
|
||||
|
|
7
modules/rosapps/drivers/vcdrom/CMakeLists.txt
Normal file
7
modules/rosapps/drivers/vcdrom/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
add_library(vcdrom SHARED vcdrom.c vcdrom.rc)
|
||||
set_module_type(vcdrom kernelmodedriver)
|
||||
target_link_libraries(vcdrom ${PSEH_LIB})
|
||||
add_importlibs(vcdrom ntoskrnl hal)
|
||||
add_cd_file(TARGET vcdrom DESTINATION reactos/system32/drivers FOR all)
|
||||
add_registry_inf(vcdrom_reg.inf)
|
29
modules/rosapps/drivers/vcdrom/vcdioctl.h
Normal file
29
modules/rosapps/drivers/vcdrom/vcdioctl.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#define IOCTL_VCDROM_BASE 0x2
|
||||
#define IOCTL_VCDROM_CREATE_DRIVE CTL_CODE(IOCTL_VCDROM_BASE, 0xCC0, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_VCDROM_DELETE_DRIVE CTL_CODE(IOCTL_VCDROM_BASE, 0xCC1, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_VCDROM_MOUNT_IMAGE CTL_CODE(IOCTL_VCDROM_BASE, 0xCC2, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_VCDROM_ENUMERATE_DRIVES CTL_CODE(IOCTL_VCDROM_BASE, 0xCC3, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_VCDROM_GET_IMAGE_PATH CTL_CODE(IOCTL_VCDROM_BASE, 0xCC4, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
typedef struct _MOUNT_PARAMETERS
|
||||
{
|
||||
WCHAR Path[255];
|
||||
USHORT Length;
|
||||
ULONG Flags;
|
||||
} MOUNT_PARAMETERS, *PMOUNT_PARAMETERS;
|
||||
|
||||
#define MOUNT_FLAG_SUPP_UDF 0x1
|
||||
#define MOUNT_FLAG_SUPP_JOLIET 0x2
|
||||
|
||||
typedef struct _DRIVES_LIST
|
||||
{
|
||||
USHORT Count;
|
||||
WCHAR Drives[26];
|
||||
} DRIVES_LIST, *PDRIVES_LIST;
|
||||
|
||||
typedef struct _IMAGE_PATH
|
||||
{
|
||||
WCHAR Path[255];
|
||||
USHORT Length;
|
||||
USHORT Mounted;
|
||||
} IMAGE_PATH, *PIMAGE_PATH;
|
1244
modules/rosapps/drivers/vcdrom/vcdrom.c
Normal file
1244
modules/rosapps/drivers/vcdrom/vcdrom.c
Normal file
File diff suppressed because it is too large
Load diff
5
modules/rosapps/drivers/vcdrom/vcdrom.rc
Normal file
5
modules/rosapps/drivers/vcdrom/vcdrom.rc
Normal file
|
@ -0,0 +1,5 @@
|
|||
#define REACTOS_VERSION_DLL
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "Virtual CD-ROM Class Driver"
|
||||
#define REACTOS_STR_INTERNAL_NAME "vcdrom"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "vcdrom.sys"
|
||||
#include <reactos/version.rc>
|
7
modules/rosapps/drivers/vcdrom/vcdrom_reg.inf
Normal file
7
modules/rosapps/drivers/vcdrom/vcdrom_reg.inf
Normal file
|
@ -0,0 +1,7 @@
|
|||
; Vcdrom class driver
|
||||
[AddReg]
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Vcdrom","ErrorControl",0x00010001,0x00000000
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Vcdrom","Group",0x00000000,"SCSI Class"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Vcdrom","ImagePath",0x00020000,"system32\drivers\vcdrom.sys"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Vcdrom","Start",0x00010001,0x00000003
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Vcdrom","Type",0x00010001,0x00000001
|
Loading…
Reference in a new issue