├── .gitignore ├── BazisPortableCDBus ├── BazisPortableCDBus.cpp ├── BazisPortableCDBus.rc ├── BazisPortableCDBus.reg ├── BazisPortableCDBus.vcproj ├── BazisPortableCDBus.vcxproj ├── BazisPortableCDBus.vcxproj.filters ├── resource.h ├── stdafx.cpp └── stdafx.h ├── BazisVirtualCDBus ├── BazisVirtualCDBus.Win32.vddklaunch ├── BazisVirtualCDBus.cpp ├── BazisVirtualCDBus.h ├── BazisVirtualCDBus.inf ├── BazisVirtualCDBus.rc ├── BazisVirtualCDBus.sln ├── BazisVirtualCDBus.vcproj ├── BazisVirtualCDBus.vcxproj ├── BazisVirtualCDBus.vcxproj.filters ├── DeviceControl.h ├── PersistentImageDatabase.cpp ├── PersistentImageDatabase.h ├── VirtualCDDevice.cpp ├── VirtualCDDevice.h ├── resource.h ├── stdafx.cpp └── stdafx.h ├── DebugLogAnalyzer ├── DebugLogAnalyzer.csproj ├── DebugLogAnalyzer.sln ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── ParsedLogFile.cs ├── Program.cs └── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── DummySign.bat ├── ImageDump ├── ImageDump.cpp ├── ImageDump.sln ├── ImageDump.vcproj ├── ReadMe.txt ├── cdstruct.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── ImageFormats ├── CCDParser.cpp ├── CCDParser.h ├── CUEParser.cpp ├── CUEParser.h ├── Filesystems │ ├── UDFHelpers.cpp │ ├── UDFHelpers.h │ ├── UDFStructures.h │ ├── miniudf.cpp │ └── miniudf.h ├── IMGParser.cpp ├── IMGParser.h ├── ImageFormats.cpp ├── ImageFormats.h ├── ImageFormats.vcxproj ├── ImageFormats.vcxproj.filters ├── ImageHelpers.h ├── MDS │ ├── MDSFormats.h │ ├── MDSParser.cpp │ ├── MDSParser.h │ └── MDSRecordSet.h ├── MultiTrackImage.h ├── NRG │ ├── NRGParser.cpp │ ├── NRGParser.h │ ├── NRGRecordSet.h │ └── NRGStructures.h ├── RawCDFormats.cpp ├── RawCDFormats.h ├── UDFAnalyzer.cpp ├── UDFAnalyzer.h ├── stdafx.cpp └── stdafx.h ├── InstallerStub ├── CustomInstaller.cpp ├── CustomInstaller.h ├── InstallerStub.cpp ├── InstallerStub.h ├── InstallerStub.ico ├── InstallerStub.rc ├── InstallerStub.sln ├── InstallerStub.vcproj ├── InstallerStub.vcxproj ├── InstallerStub.vcxproj.filters ├── ReadMe.txt ├── box.ico ├── chbox.ico ├── compat.manifest ├── ico203.ico ├── installer.ico ├── resource.h ├── small.ico ├── stdafx.cpp ├── stdafx.h ├── targetver.h ├── versioninfo.h ├── wcd-icon.ico └── wcd-icon128.bmp ├── LICENSE ├── Uninstall ├── ReadMe.txt ├── stdafx.cpp ├── stdafx.h ├── targetver.h ├── uninstall.cpp ├── uninstall.vcproj ├── uninstall.vcxproj └── uninstall.vcxproj.filters ├── VirtualAutorunDisabler ├── ReadMe.txt ├── VirtualAutorunDisabler.cpp ├── VirtualAutorunDisabler.idl ├── VirtualAutorunDisabler.rc ├── VirtualAutorunDisabler.rgs ├── VirtualAutorunDisabler.vcproj ├── VirtualAutorunDisabler.vcxproj ├── VirtualAutorunDisabler.vcxproj.filters ├── VirtualAutorunDisablerPS.vcproj ├── VirtualAutorunDisablerPS.vcxproj ├── VirtualAutorunDisablerPS.vcxproj.filters ├── VirtualAutorunDisabler_p.c ├── VirtualAutorunDisablerps.def ├── VirtualAutorunDisablingMonitor.cpp ├── VirtualAutorunDisablingMonitor.h ├── VirtualAutorunDisablingMonitor.rgs ├── dlldata.c ├── resource.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── VirtualCDCtl ├── BadSectorDatabase.h ├── CDSpeed.cpp ├── CDSpeed.h ├── DriveReadingThread.cpp ├── DriveReadingThread.h ├── ReadMe.txt ├── VirtualCDClient.cpp ├── VirtualCDClient.h ├── VirtualCDCtl.vcxproj ├── VirtualCDCtl.vcxproj.filters ├── VirtualDriveClient.cpp ├── VirtualDriveClient.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── VirtualDriveManager ├── DriverInstaller.cpp ├── DriverInstaller.h ├── MainDlg.cpp ├── MainDlg.h ├── VirtualDriveManager.cpp ├── VirtualDriveManager.h ├── VirtualDriveManager.rc ├── VirtualDriveManager.vcproj ├── VirtualDriveManager.vcxproj ├── VirtualDriveManager.vcxproj.filters ├── res │ └── VirtualDriveManager.ico ├── resource.h ├── stdafx.cpp └── stdafx.h ├── WinCDEmu.sln ├── WinCDEmuContextMenu ├── ContextMenuBase.cpp ├── ContextMenuBase.h ├── DebugLog.h ├── DriveContextMenu.cpp ├── DriveContextMenu.h ├── DriveContextMenu.rgs ├── ReadMe.txt ├── TransparentMenuBitmap.cpp ├── TransparentMenuBitmap.h ├── VCDImgContextMenu.cpp ├── VCDImgContextMenu.h ├── VCDImgContextMenu.rgs ├── WinCDEmuContextMenu.cpp ├── WinCDEmuContextMenu.def ├── WinCDEmuContextMenu.idl ├── WinCDEmuContextMenu.rc ├── WinCDEmuContextMenu.rgs ├── WinCDEmuContextMenu.vcproj ├── WinCDEmuContextMenu.vcxproj ├── WinCDEmuContextMenu.vcxproj.filters ├── WinCDEmuContextMenu_p.c ├── dlldata.c ├── dlldatax.c ├── dlldatax.h ├── dllmain.cpp ├── dllmain.h ├── resource.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── _distr ├── VirtualCD.xit ├── drivers.xic ├── langfiles │ ├── vmnt_Arabic.lng │ ├── vmnt_Bengali.lng │ ├── vmnt_Catalan.lng │ ├── vmnt_Czech.lng │ ├── vmnt_Farsi.lng │ ├── vmnt_Indonesia.lng │ ├── vmnt_Slovak.lng │ ├── vmnt_Taiwan.lng │ ├── vmnt_armenian.lng │ ├── vmnt_bahasaindonesia.lng │ ├── vmnt_bulgarian.lng │ ├── vmnt_dansk.lng │ ├── vmnt_dutch.lng │ ├── vmnt_english.lng │ ├── vmnt_estonian.lng │ ├── vmnt_finnish.lng │ ├── vmnt_french.lng │ ├── vmnt_german.lng │ ├── vmnt_greek.lng │ ├── vmnt_hebrew.lng │ ├── vmnt_hungarian.lng │ ├── vmnt_italian.lng │ ├── vmnt_japanese.lng │ ├── vmnt_kannada.lng │ ├── vmnt_korean.lng │ ├── vmnt_kurdish.lng │ ├── vmnt_lithuanian.lng │ ├── vmnt_macedonian.lng │ ├── vmnt_malay.lng │ ├── vmnt_norsk.lng │ ├── vmnt_norwegian.lng │ ├── vmnt_polish.lng │ ├── vmnt_portuguese.lng │ ├── vmnt_portuguese_brazil.lng │ ├── vmnt_romanian.lng │ ├── vmnt_russian.lng │ ├── vmnt_slovenian.lng │ ├── vmnt_slovenscina.lng │ ├── vmnt_spanish.lng │ ├── vmnt_sr.lng │ ├── vmnt_swedish.lng │ ├── vmnt_ta.lng │ ├── vmnt_turkish.lng │ ├── vmnt_urdu.lng │ ├── vmnt_uzbek.lng │ ├── vmnt_zh_CN.lng │ └── vmnt_zh_TW.lng ├── main.xic ├── make.bat └── readme.txt ├── batchmnt ├── ReadMe.txt ├── batchmnt.cpp ├── batchmnt.rc ├── batchmnt.vcproj ├── batchmnt.vcxproj ├── batchmnt.vcxproj.filters ├── main.cpp ├── resource.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── readme.md ├── redist ├── cdrtools-3.01a25_mingw.patch └── mkisofs.exe ├── vmnt ├── BadSectorDialog.h ├── BadSectorReportDialog.h ├── ContextMenuLabels.h ├── ISOBuildProgressDialog.cpp ├── ISOBuildProgressDialog.h ├── ISOProgressDialog.cpp ├── ISOProgressDialog.h ├── LetterSelectionDialog.cpp ├── LetterSelectionDialog.h ├── RegistryParams.h ├── SettingsDialog.cpp ├── SettingsDialog.h ├── TaskBarInterface.h ├── UACInvokerDialog.h ├── cd.ico ├── resource.h ├── stdafx.cpp ├── stdafx.h ├── versioninfo.h ├── vmnt.cpp ├── vmnt.rc ├── vmnt.vcproj ├── vmnt.vcxproj ├── vmnt.vcxproj.filters └── wcd-icon.ico └── wcdversion.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | *.pdb 30 | *.exp 31 | Debug 32 | Release 33 | x64 34 | Debug (user-mode) 35 | Release (user-mode) 36 | DebugPS 37 | ReleasePS 38 | _distr/app 39 | _distr/drivers 40 | ipch 41 | *.sdf 42 | *.suo 43 | /VirtualAutorunDisabler/VirtualAutorunDisabler_i.c 44 | /VirtualAutorunDisabler/VirtualAutorunDisabler_i.h 45 | /VirtualAutorunDisabler/VirtualAutorunDisabler_p32.c 46 | /VirtualAutorunDisabler/VirtualAutorunDisabler_p64.c 47 | /WinCDEmuContextMenu/WinCDEmuContextMenu_i.c 48 | /WinCDEmuContextMenu/WinCDEmuContextMenu_i.h 49 | /WinCDEmuContextMenu/WinCDEmuContextMenu_p32.c 50 | /WinCDEmuContextMenu/WinCDEmuContextMenu_p64.c 51 | /AllModules 52 | /_distr/_drvinst.bzz 53 | /_distr/_drvinst.bzz.stat 54 | /_distr/drivers.bzz 55 | /_distr/drivers.bzz.stat 56 | /_distr/main.bzz 57 | /_distr/main.bzz.stat 58 | /vmnt/vmnt.lng 59 | /vmnt/vmnt_lng.cpp 60 | /vmnt/vmnt_lng.h 61 | -------------------------------------------------------------------------------- /BazisPortableCDBus/BazisPortableCDBus.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | #include "../wcdversion.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "afxres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // Russian resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) 20 | #ifdef _WIN32 21 | LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT 22 | #pragma code_page(1251) 23 | #endif //_WIN32 24 | 25 | #ifdef APSTUDIO_INVOKED 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // 28 | // TEXTINCLUDE 29 | // 30 | 31 | 1 TEXTINCLUDE 32 | BEGIN 33 | "resource.h\0" 34 | END 35 | 36 | 2 TEXTINCLUDE 37 | BEGIN 38 | "#include ""afxres.h""\r\n" 39 | "\0" 40 | END 41 | 42 | 3 TEXTINCLUDE 43 | BEGIN 44 | "\r\n" 45 | "\0" 46 | END 47 | 48 | #endif // APSTUDIO_INVOKED 49 | 50 | 51 | ///////////////////////////////////////////////////////////////////////////// 52 | // 53 | // Version 54 | // 55 | 56 | VS_VERSION_INFO VERSIONINFO 57 | FILEVERSION WINCDEMU_VERSION 58 | PRODUCTVERSION WINCDEMU_VERSION 59 | FILEFLAGSMASK 0x17L 60 | #ifdef _DEBUG 61 | FILEFLAGS 0x1L 62 | #else 63 | FILEFLAGS 0x0L 64 | #endif 65 | FILEOS 0x4L 66 | FILETYPE 0x1L 67 | FILESUBTYPE 0x0L 68 | BEGIN 69 | BLOCK "StringFileInfo" 70 | BEGIN 71 | BLOCK "000004b0" 72 | BEGIN 73 | VALUE "Comments", COMMENTS_STR 74 | VALUE "CompanyName", COMPANY_STR 75 | VALUE "FileDescription", "Portable WinCDEmu driver" 76 | VALUE "FileVersion", WINCDEMU_VERSION_STR 77 | VALUE "LegalCopyright", COPYRIGHT_STR 78 | VALUE "LegalTrademarks", TRADEMARKS_STR 79 | VALUE "OriginalFilename", "BazisPortableCDBus.sys" 80 | VALUE "ProductName", PRODUCTNAME_STR 81 | VALUE "ProductVersion", WINCDEMU_VERSION_STR 82 | END 83 | END 84 | BLOCK "VarFileInfo" 85 | BEGIN 86 | VALUE "Translation", 0, 1200 87 | END 88 | END 89 | 90 | #endif // Russian resources 91 | ///////////////////////////////////////////////////////////////////////////// 92 | 93 | 94 | 95 | #ifndef APSTUDIO_INVOKED 96 | ///////////////////////////////////////////////////////////////////////////// 97 | // 98 | // Generated from the TEXTINCLUDE 3 resource. 99 | // 100 | 101 | 102 | ///////////////////////////////////////////////////////////////////////////// 103 | #endif // not APSTUDIO_INVOKED 104 | 105 | -------------------------------------------------------------------------------- /BazisPortableCDBus/BazisPortableCDBus.reg: -------------------------------------------------------------------------------- 1 | REGEDIT4 2 | 3 | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BazisPortableCDBus] 4 | "ErrorControl"=dword:00000001 5 | "Start"=dword:00000001 6 | "Type"=dword:00000001 7 | -------------------------------------------------------------------------------- /BazisPortableCDBus/BazisPortableCDBus.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {51fc1d0d-63e9-4403-ba04-922942b71767} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {b63ad6cb-0936-4710-807b-2f6c6e5791c2} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source files 16 | 17 | 18 | Source files 19 | 20 | 21 | Source files 22 | 23 | 24 | Source files 25 | 26 | 27 | Source files 28 | 29 | 30 | 31 | 32 | Header files 33 | 34 | 35 | Header files 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /BazisPortableCDBus/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by BazisPortableCDBus.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /BazisPortableCDBus/stdafx.cpp: -------------------------------------------------------------------------------- 1 | //This file is used to build a precompiled header 2 | #include "stdafx.h" -------------------------------------------------------------------------------- /BazisPortableCDBus/stdafx.h: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /BazisVirtualCDBus/BazisVirtualCDBus.Win32.vddklaunch: -------------------------------------------------------------------------------- 1 | 2 | 3 | vm://Win7x64 4 | 5 | %SystemRoot%\System32\Drivers\BazisVirtualCDBus.sys 6 | PnpEnableDisable 7 | root\BazisVirtualCDBus 8 | 0 9 | PnpEnableDisable 10 | root\BazisVirtualCDBus 11 | 0 12 | true 13 | AutoInstallInteractive 14 | -------------------------------------------------------------------------------- /BazisVirtualCDBus/BazisVirtualCDBus.inf: -------------------------------------------------------------------------------- 1 | [Version] 2 | Signature="$WINDOWS NT$" 3 | Class=SCSIAdapter 4 | ClassGuid={4d36e97b-e325-11ce-bfc1-08002be10318} 5 | Provider=%BAZIS% 6 | DriverVer=06/02/2015, 4.01.0001 7 | CatalogFile=BazisVirtualCDBus.cat 8 | 9 | [DestinationDirs] 10 | DefaultDestDir = 12 11 | 12 | [SourceDisksNames.x86] 13 | 1 = %DiskId1%,,, 14 | 15 | [SourceDisksNames.amd64] 16 | 1 = %DiskId1%,,, 17 | 18 | [SourceDisksFiles.x86] 19 | BazisVirtualCDBus.sys = 1,\x86 20 | 21 | [SourceDisksFiles.amd64] 22 | BazisVirtualCDBus.sys = 1,\x64 23 | 24 | [Manufacturer] 25 | %BAZIS%=Standard, NTamd64 26 | 27 | [Standard] 28 | %BazisVirtualCDBus.DeviceDesc%=BazisVirtualCDBus_Device, root\BazisVirtualCDBus 29 | 30 | [Standard.NTamd64] 31 | %BazisVirtualCDBus.DeviceDesc%=BazisVirtualCDBus_Device, root\BazisVirtualCDBus 32 | 33 | [BazisVirtualCDBus_Device.NT] 34 | CopyFiles=Drivers_Dir 35 | 36 | [Drivers_Dir] 37 | BazisVirtualCDBus.sys,,,2 38 | 39 | ;-------------- Service installation 40 | [BazisVirtualCDBus_Device.NT.Services] 41 | AddService = BazisVirtualCDBus,%SPSVCINST_ASSOCSERVICE%, dev_Service_Inst 42 | 43 | ; -------------- busenum driver install sections 44 | [dev_Service_Inst] 45 | DisplayName = %dev.SVCDESC% 46 | ServiceType = 1 ; SERVICE_KERNEL_DRIVER 47 | StartType = 3 ; SERVICE_DEMAND_START 48 | ErrorControl = 1 ; SERVICE_ERROR_NORMAL 49 | ServiceBinary = %12%\BazisVirtualCDBus.sys 50 | LoadOrderGroup = Extended Base 51 | 52 | 53 | [Strings] 54 | SPSVCINST_ASSOCSERVICE= 0x00000002 55 | BAZIS = "SysProgs.org" 56 | DiskId1 = "WinCDEmu installation directory" 57 | BazisVirtualCDBus.DeviceDesc = "WinCDEmu Virtual Bus" 58 | dev.SVCDESC = "WinCDEmu Virtual Bus Driver" 59 | -------------------------------------------------------------------------------- /BazisVirtualCDBus/BazisVirtualCDBus.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | #include "../wcdversion.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "afxres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // Russian resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) 20 | #ifdef _WIN32 21 | LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT 22 | #pragma code_page(1251) 23 | #endif //_WIN32 24 | 25 | #ifdef APSTUDIO_INVOKED 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // 28 | // TEXTINCLUDE 29 | // 30 | 31 | 1 TEXTINCLUDE 32 | BEGIN 33 | "resource.h\0" 34 | END 35 | 36 | 2 TEXTINCLUDE 37 | BEGIN 38 | "#include ""afxres.h""\r\n" 39 | "\0" 40 | END 41 | 42 | 3 TEXTINCLUDE 43 | BEGIN 44 | "\r\n" 45 | "\0" 46 | END 47 | 48 | #endif // APSTUDIO_INVOKED 49 | 50 | 51 | ///////////////////////////////////////////////////////////////////////////// 52 | // 53 | // Version 54 | // 55 | 56 | VS_VERSION_INFO VERSIONINFO 57 | FILEVERSION WINCDEMU_VERSION 58 | PRODUCTVERSION WINCDEMU_VERSION 59 | FILEFLAGSMASK 0x17L 60 | #ifdef _DEBUG 61 | FILEFLAGS 0x1L 62 | #else 63 | FILEFLAGS 0x0L 64 | #endif 65 | FILEOS 0x40000L 66 | FILETYPE 0x3L 67 | FILESUBTYPE 0x7L 68 | BEGIN 69 | BLOCK "StringFileInfo" 70 | BEGIN 71 | BLOCK "000004b0" 72 | BEGIN 73 | VALUE "Comments", COMMENTS_STR 74 | VALUE "CompanyName", COMPANY_STR 75 | VALUE "FileDescription", "WinCDEmu virtual CDROM bus" 76 | VALUE "FileVersion", WINCDEMU_VERSION_STR 77 | VALUE "LegalCopyright", COPYRIGHT_STR 78 | VALUE "LegalTrademarks", TRADEMARKS_STR 79 | VALUE "OriginalFilename", "BazisVirtualCD.sys" 80 | VALUE "ProductName", PRODUCTNAME_STR 81 | VALUE "ProductVersion", WINCDEMU_VERSION_STR 82 | END 83 | END 84 | BLOCK "VarFileInfo" 85 | BEGIN 86 | VALUE "Translation", 0x0, 1200 87 | END 88 | END 89 | 90 | #endif // Russian resources 91 | ///////////////////////////////////////////////////////////////////////////// 92 | 93 | 94 | 95 | #ifndef APSTUDIO_INVOKED 96 | ///////////////////////////////////////////////////////////////////////////// 97 | // 98 | // Generated from the TEXTINCLUDE 3 resource. 99 | // 100 | 101 | 102 | ///////////////////////////////////////////////////////////////////////////// 103 | #endif // not APSTUDIO_INVOKED 104 | 105 | -------------------------------------------------------------------------------- /BazisVirtualCDBus/BazisVirtualCDBus.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c99487da-0622-4d89-bbe9-892755876729} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {8500b709-3730-4210-9550-0969d72db36c} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source files 16 | 17 | 18 | Source files 19 | 20 | 21 | Source files 22 | 23 | 24 | Source files 25 | 26 | 27 | 28 | 29 | Header files 30 | 31 | 32 | Header files 33 | 34 | 35 | Header files 36 | 37 | 38 | Header files 39 | 40 | 41 | Header files 42 | 43 | 44 | Header files 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /BazisVirtualCDBus/DeviceControl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define IOCTL_PLUGIN_DEVICE CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x001,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 3 | #define IOCTL_PLUGOUT_DEVICE CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x002,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 4 | #define IOCTL_EJECT_DEVICE CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x003,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 5 | #define IOCTL_IS_DEVICE_PRESENT CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x004,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 6 | 7 | #define IOCTL_LIST_DEVICES CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x011,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 8 | #define IOCTL_PLUGIN_DEVICE_RETURN_WAITHANDLE CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x012,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 9 | #define IOCTL_QUERY_DRIVER_VERSION CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x013,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 10 | #define IOCTL_SOFT_PLUGOUT_DEVICE CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x019,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 11 | 12 | //#define WINCDEMU_DEBUG_LOGGING_SUPPORT 13 | #ifdef WINCDEMU_DEBUG_LOGGING_SUPPORT 14 | #define IOCTL_SET_DEBUG_LOG_DIR CTL_CODE(FILE_DEVICE_BUS_EXTENDER,0x021,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA) 15 | #endif 16 | 17 | #define IOCTL_VDEV_IS_AUTORUN_DISABLED CTL_CODE(FILE_DEVICE_VIRTUAL_DISK,0x014,METHOD_BUFFERED,FILE_READ_DATA) 18 | #define IOCTL_VDEV_GET_IMAGE_PATH CTL_CODE(FILE_DEVICE_VIRTUAL_DISK,0x015,METHOD_BUFFERED,FILE_READ_DATA) 19 | #define IOCTL_VDEV_GET_MMC_PROFILE CTL_CODE(FILE_DEVICE_VIRTUAL_DISK,0x016,METHOD_BUFFERED,FILE_READ_DATA) 20 | #define IOCTL_VDEV_SET_MMC_PROFILE CTL_CODE(FILE_DEVICE_VIRTUAL_DISK,0x018,METHOD_BUFFERED,FILE_READ_DATA) 21 | #define IOCTL_VDEV_MOUNT_IMAGE CTL_CODE(FILE_DEVICE_VIRTUAL_DISK,0x019,METHOD_BUFFERED,FILE_READ_DATA) //Data contains NULL-terminated path or empty string to unmount the image 22 | 23 | #include "../wcdversion.h" 24 | #define WINCDEMU_DRIVER_VERSION_CURRENT WINCDEMU_VER_INT 25 | 26 | 27 | struct VirtualCDRecord 28 | { 29 | unsigned DriveLetter; 30 | unsigned ImageNameOffset; 31 | 32 | unsigned short HandleCount, RefCount, DeviceRefCount, Reserved; 33 | }; 34 | 35 | struct VirtualCDRecordHeader 36 | { 37 | enum {CurrentVersion = 2}; 38 | unsigned Version; 39 | unsigned TotalSize; 40 | unsigned RecordCount; 41 | #pragma warning( push ) 42 | #pragma warning( disable : 4200 ) 43 | VirtualCDRecord Records[0]; 44 | #pragma warning( pop ) 45 | }; 46 | 47 | #define MAX_STR_SIZE 512 48 | struct VirtualCDMountParams 49 | { 50 | wchar_t wszFilePath[MAX_STR_SIZE]; 51 | unsigned StructureVersion; 52 | bool DisableAutorun; 53 | char SuggestedDriveLetter; 54 | bool KeepAfterRestart; 55 | unsigned short MMCProfile; 56 | 57 | enum {CurrentVersion = 4}; 58 | }; 59 | 60 | struct GUIDAndVersion 61 | { 62 | GUID Guid; 63 | unsigned Version; 64 | }; 65 | 66 | 67 | // {6e1ec3ac-d9cc-423e-8862-bade124324c8} 68 | #ifdef SKIP_WINCDEMU_GUID_DEFINITION 69 | extern GUID GUID_BazisVirtualCDBus; 70 | extern GUID GUID_WinCDEmuDrive; 71 | #else 72 | GUID GUID_BazisVirtualCDBus = {0x6E1EC3AC, 0xd9cc, 0x423e, {0x88, 0x62, 0xba, 0xde, 0x12, 0x43, 0x24, 0xc8 } }; 73 | GUID GUID_WinCDEmuDrive = { 0x98f41ee4, 0x819b, 0x46fb, { 0xb1, 0x40, 0xa7, 0xf6, 0x7c, 0x5b, 0xc0, 0x91 } }; 74 | #endif -------------------------------------------------------------------------------- /BazisVirtualCDBus/PersistentImageDatabase.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "PersistentImageDatabase.h" 3 | #include 4 | 5 | using namespace BazisLib; 6 | using namespace BazisLib::DDK; 7 | 8 | static const wchar_t wszImagePathKey[] = L"ImagePath"; 9 | static const wchar_t wszSuggestedLetterKey[] = L"DriveLetter"; 10 | static const wchar_t wszMMCProfile[] = L"MMCProfile"; 11 | static const wchar_t wszLastMountStatusKey[] = L"LastAutoMountStatus"; 12 | 13 | String PersistentImageDatabase::AddImage(const wchar_t *pImage, char suggestedDriveLetter, unsigned MMCProfile) 14 | { 15 | MutexLocker lck(m_Mutex); 16 | if (m_RegPath.empty()) 17 | return String(); 18 | 19 | RegistryKey key(m_RegPath.c_str()); 20 | if (!key.Valid()) 21 | return String(); 22 | 23 | String subkeyName; 24 | 25 | for (int i = 0; i < 1000; i++) 26 | { 27 | subkeyName = key.EnumSubkey(i); 28 | if (subkeyName.empty()) 29 | break; 30 | 31 | RegistryKey subKey = key[subkeyName.c_str()]; 32 | if (!((String)subKey[wszImagePathKey]).icompare(pImage)) 33 | break; 34 | } 35 | 36 | if (subkeyName.empty()) 37 | for (int i = 0; i < 1000; i++) 38 | { 39 | wchar_t wszSubkey[32]; 40 | swprintf(wszSubkey, L"%02d", i); 41 | RegistryKey subkey(key, wszSubkey, true); 42 | if (subkey.Valid()) 43 | continue; 44 | 45 | subkeyName = wszSubkey; 46 | break; 47 | } 48 | 49 | 50 | RegistryKey subKey = key[subkeyName.c_str()]; 51 | subKey[wszImagePathKey] = pImage; 52 | wchar_t wchLetter = suggestedDriveLetter; 53 | subKey[wszSuggestedLetterKey] = String(&wchLetter, 1); 54 | subKey[wszMMCProfile] = MMCProfile; 55 | 56 | return subkeyName; 57 | } 58 | 59 | std::list PersistentImageDatabase::LoadImageList() 60 | { 61 | MutexLocker lck(m_Mutex); 62 | std::list records; 63 | if (m_RegPath.empty()) 64 | return records; 65 | 66 | RegistryKey key(m_RegPath.c_str()); 67 | if (!key.Valid()) 68 | return records; 69 | 70 | String subkeyName; 71 | 72 | for (int i = 0; i < 1000; i++) 73 | { 74 | subkeyName = key.EnumSubkey(i); 75 | if (subkeyName.empty()) 76 | break; 77 | 78 | RegistryKey subKey = key[subkeyName.c_str()]; 79 | ImageRecord rec; 80 | 81 | rec.ImagePath = subKey[wszImagePathKey]; 82 | rec.Key = subkeyName; 83 | rec.DriveLetter = 0; 84 | String drvLetter = subKey[wszSuggestedLetterKey]; 85 | if (drvLetter.length() >= 1) 86 | rec.DriveLetter = (char)drvLetter[0]; 87 | 88 | rec.MMCProfile = subKey[wszMMCProfile]; 89 | 90 | records.push_back(rec); 91 | } 92 | 93 | return records; 94 | } 95 | 96 | bool PersistentImageDatabase::RemoveImageByKey(const String &Key) 97 | { 98 | MutexLocker lck(m_Mutex); 99 | if (m_RegPath.empty()) 100 | return false; 101 | 102 | RegistryKey key(m_RegPath.c_str()); 103 | if (!key.Valid()) 104 | return false; 105 | 106 | RegistryKey subKey = key[Key.c_str()]; 107 | return subKey.DeleteSelf(); 108 | } 109 | 110 | void PersistentImageDatabase::ReportMountStatus(const BazisLib::String &Key, NTSTATUS status) 111 | { 112 | MutexLocker lck(m_Mutex); 113 | if (m_RegPath.empty()) 114 | return; 115 | 116 | RegistryKey key(m_RegPath.c_str()); 117 | if (!key.Valid()) 118 | return; 119 | 120 | RegistryKey subKey = key[Key.c_str()]; 121 | subKey[wszLastMountStatusKey] = status; 122 | } -------------------------------------------------------------------------------- /BazisVirtualCDBus/PersistentImageDatabase.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | class PersistentImageDatabase : AUTO_OBJECT 8 | { 9 | private: 10 | BazisLib::String m_RegPath; 11 | BazisLib::Mutex m_Mutex; 12 | 13 | public: 14 | void SetRegistryPath(const BazisLib::TempString ®Path) 15 | { 16 | m_RegPath = regPath; 17 | } 18 | 19 | BazisLib::String AddImage(const wchar_t *pImage, char suggestedDriveLetter, unsigned MMCProfile); 20 | bool RemoveImageByKey(const BazisLib::String &Key); 21 | 22 | struct ImageRecord 23 | { 24 | BazisLib::String Key, ImagePath; 25 | char DriveLetter; 26 | unsigned short MMCProfile; 27 | }; 28 | 29 | std::list LoadImageList(); 30 | void ReportMountStatus(const BazisLib::String &Key, NTSTATUS status); 31 | 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /BazisVirtualCDBus/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by BazisVirtualCDBus.rc 4 | // 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NEXT_RESOURCE_VALUE 101 11 | #define _APS_NEXT_COMMAND_VALUE 40001 12 | #define _APS_NEXT_CONTROL_VALUE 1001 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /BazisVirtualCDBus/stdafx.cpp: -------------------------------------------------------------------------------- 1 | //This file is used to build a precompiled header 2 | #include "stdafx.h" -------------------------------------------------------------------------------- /BazisVirtualCDBus/stdafx.h: -------------------------------------------------------------------------------- 1 | #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 2 | #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. 3 | #endif 4 | 5 | #include -------------------------------------------------------------------------------- /DebugLogAnalyzer/DebugLogAnalyzer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {6E9CC3A0-6F4C-4D8F-AD5D-344C1E608EF2} 9 | WinExe 10 | Properties 11 | DebugLogAnalyzer 12 | DebugLogAnalyzer 13 | v2.0 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | Form 44 | 45 | 46 | Form1.cs 47 | 48 | 49 | 50 | 51 | 52 | Form1.cs 53 | 54 | 55 | ResXFileCodeGenerator 56 | Resources.Designer.cs 57 | Designer 58 | 59 | 60 | True 61 | Resources.resx 62 | 63 | 64 | SettingsSingleFileGenerator 65 | Settings.Designer.cs 66 | 67 | 68 | True 69 | Settings.settings 70 | True 71 | 72 | 73 | 74 | 81 | -------------------------------------------------------------------------------- /DebugLogAnalyzer/DebugLogAnalyzer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DebugLogAnalyzer", "DebugLogAnalyzer.csproj", "{6E9CC3A0-6F4C-4D8F-AD5D-344C1E608EF2}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {6E9CC3A0-6F4C-4D8F-AD5D-344C1E608EF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {6E9CC3A0-6F4C-4D8F-AD5D-344C1E608EF2}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {6E9CC3A0-6F4C-4D8F-AD5D-344C1E608EF2}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {6E9CC3A0-6F4C-4D8F-AD5D-344C1E608EF2}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /DebugLogAnalyzer/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DebugLogAnalyzer 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.button1 = new System.Windows.Forms.Button(); 32 | this.listBox1 = new System.Windows.Forms.ListBox(); 33 | this.SuspendLayout(); 34 | // 35 | // button1 36 | // 37 | this.button1.Location = new System.Drawing.Point(12, 373); 38 | this.button1.Name = "button1"; 39 | this.button1.Size = new System.Drawing.Size(75, 23); 40 | this.button1.TabIndex = 0; 41 | this.button1.Text = "button1"; 42 | this.button1.UseVisualStyleBackColor = true; 43 | this.button1.Click += new System.EventHandler(this.button1_Click); 44 | // 45 | // listBox1 46 | // 47 | this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 48 | | System.Windows.Forms.AnchorStyles.Left) 49 | | System.Windows.Forms.AnchorStyles.Right))); 50 | this.listBox1.FormattingEnabled = true; 51 | this.listBox1.Location = new System.Drawing.Point(12, 12); 52 | this.listBox1.Name = "listBox1"; 53 | this.listBox1.Size = new System.Drawing.Size(319, 342); 54 | this.listBox1.TabIndex = 1; 55 | // 56 | // Form1 57 | // 58 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 59 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 60 | this.ClientSize = new System.Drawing.Size(691, 408); 61 | this.Controls.Add(this.listBox1); 62 | this.Controls.Add(this.button1); 63 | this.Name = "Form1"; 64 | this.Text = "Form1"; 65 | this.ResumeLayout(false); 66 | 67 | } 68 | 69 | #endregion 70 | 71 | private System.Windows.Forms.Button button1; 72 | private System.Windows.Forms.ListBox listBox1; 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /DebugLogAnalyzer/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace DebugLogAnalyzer 10 | { 11 | public partial class Form1 : Form 12 | { 13 | public Form1() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | private void button1_Click(object sender, EventArgs e) 19 | { 20 | ParsedLogFile logFile = new ParsedLogFile(@"C:\Users\Bazis\AppData\Roaming\WinCDEmu.debug\vcd00000.log"); 21 | foreach (ParsedLogFile.Entry entry in logFile.Data) 22 | listBox1.Items.Add(entry); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DebugLogAnalyzer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace DebugLogAnalyzer 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new Form1()); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DebugLogAnalyzer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DebugLogAnalyzer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("DebugLogAnalyzer")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8566c119-f3de-407e-b2ad-b20a031b6d9f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /DebugLogAnalyzer/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.4959 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DebugLogAnalyzer.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DebugLogAnalyzer.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /DebugLogAnalyzer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.4959 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DebugLogAnalyzer.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /DebugLogAnalyzer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DummySign.bat: -------------------------------------------------------------------------------- 1 | @echo Warning: SIGN_RELEASE_BINARY not defined. %1 will not be signed. -------------------------------------------------------------------------------- /ImageDump/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | CONSOLE APPLICATION : ImageDump Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this ImageDump application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your ImageDump application. 9 | 10 | 11 | ImageDump.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | ImageDump.cpp 18 | This is the main application source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named ImageDump.pch and a precompiled types file named StdAfx.obj. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other notes: 29 | 30 | AppWizard uses "TODO:" comments to indicate parts of the source code you 31 | should add to or customize. 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | -------------------------------------------------------------------------------- /ImageDump/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // ImageDump.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /ImageDump/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | 15 | 16 | // TODO: reference additional headers your program requires here 17 | -------------------------------------------------------------------------------- /ImageDump/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /ImageFormats/CCDParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ImageFormats.h" 3 | 4 | namespace ImageFormats 5 | { 6 | class CCDParser : public AICDImageFormatParser 7 | { 8 | public: 9 | virtual ProbeResult Probe(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath, bool SecondPass); 10 | virtual ManagedPointer OpenImage(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath); 11 | }; 12 | } -------------------------------------------------------------------------------- /ImageFormats/CUEParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ImageFormats.h" 3 | 4 | namespace ImageFormats 5 | { 6 | class CUEParser : public AICDImageFormatParser 7 | { 8 | public: 9 | virtual ProbeResult Probe(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath, bool SecondPass); 10 | virtual ManagedPointer OpenImage(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath); 11 | }; 12 | } -------------------------------------------------------------------------------- /ImageFormats/Filesystems/UDFHelpers.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "UDFHelpers.h" 3 | 4 | static const unsigned short s_CRCTable[256] = { 5 | 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 6 | 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 7 | 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, 8 | 0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, 9 | 0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485, 10 | 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D, 11 | 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4, 12 | 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC, 13 | 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, 14 | 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, 15 | 0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, 16 | 0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, 17 | 0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, 18 | 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, 19 | 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70, 20 | 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, 21 | 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, 22 | 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, 23 | 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, 24 | 0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, 25 | 0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, 26 | 0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 27 | 0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C, 28 | 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634, 29 | 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB, 30 | 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3, 31 | 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, 32 | 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, 33 | 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, 34 | 0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, 35 | 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, 36 | 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 37 | }; 38 | 39 | unsigned short UDFHelpers::CRC16(const void *pData, size_t length) 40 | { 41 | unsigned short crc = 0; 42 | unsigned char *p = (unsigned char *)pData; 43 | 44 | while (length--) 45 | crc = s_CRCTable[(crc>>8 ^ *p++) & 0xff] ^ (crc<<8); 46 | return crc; 47 | } 48 | 49 | std::wstring UDFHelpers::UncompressUnicode(size_t numberOfBytes, const unsigned char *UDFCompressed) 50 | { 51 | unsigned int compID = UDFCompressed[0]; 52 | wchar_t wch = 0; 53 | 54 | std::wstring result; 55 | 56 | if (compID != 8 && compID != 16) 57 | return result; 58 | 59 | size_t byteIndex = 1; 60 | 61 | while (byteIndex < numberOfBytes) 62 | { 63 | if (compID == 16) 64 | wch = UDFCompressed[byteIndex++] << 8; 65 | else 66 | wch = 0; 67 | 68 | if (byteIndex < numberOfBytes) 69 | wch |= UDFCompressed[byteIndex++]; 70 | 71 | if (!wch) 72 | break; 73 | 74 | result.append(1, wch); 75 | wch = 0; 76 | } 77 | return result; 78 | } -------------------------------------------------------------------------------- /ImageFormats/Filesystems/UDFHelpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | 5 | namespace UDFHelpers 6 | { 7 | unsigned short CRC16(const void *pData, size_t length); 8 | std::wstring UncompressUnicode(size_t numberOfBytes, const unsigned char *UDFCompressed); 9 | 10 | template static inline std::wstring UncompressUnicode(const unsigned char (&UDFCompressed)[_Len]) 11 | { 12 | return UncompressUnicode(_Len, UDFCompressed); 13 | } 14 | } -------------------------------------------------------------------------------- /ImageFormats/IMGParser.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "IMGParser.h" 3 | #include "RawCDFormats.h" 4 | 5 | using namespace ImageFormats; 6 | using namespace BazisLib; 7 | 8 | ProbeResult IMGParser::Probe( const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath, bool SecondPass ) 9 | { 10 | if (!SecondPass) 11 | { 12 | if (!FileExtension.icompare(_T("bin")) || !FileExtension.icompare(_T("img")) || !FileExtension.icompare(_T("iso"))) 13 | return NameOnlyMatch; 14 | else 15 | return ProbableMatch; 16 | } 17 | else 18 | { 19 | ASSERT(pFile); 20 | RawCDFormatDescriptor desc = {0,}; 21 | if (DetectRawCDFormat(pFile, &desc)) 22 | return ProbableMatch; 23 | else 24 | return NoMatch; 25 | } 26 | } 27 | 28 | ManagedPointer ImageFormats::IMGParser::OpenImage( const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath ) 29 | { 30 | RawCDFormatDescriptor desc = {0,}; 31 | if (!DetectRawCDFormat(pFile, &desc)) 32 | return NULL; 33 | if (!desc.SectorSize) 34 | return NULL; 35 | return new IMGImage(pFile, &desc); 36 | } -------------------------------------------------------------------------------- /ImageFormats/IMGParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ImageFormats.h" 3 | #include "RawCDFormats.h" 4 | 5 | namespace ImageFormats 6 | { 7 | class IMGImage : public ParsedCDImageBase 8 | { 9 | private: 10 | RawCDFormatDescriptor m_FormatDescriptor; 11 | 12 | public: 13 | IMGImage(const ConstManagedPointer &pFile, RawCDFormatDescriptor *pDesc) 14 | : ParsedCDImageBase(pFile, (unsigned)((pFile->GetSize() - pDesc->InitialOffset) / pDesc->SectorSize) + 150) 15 | , m_FormatDescriptor(*pDesc) 16 | { 17 | } 18 | 19 | virtual size_t ReadSectorsBoundsChecked(unsigned FirstSector, void *pBuffer, unsigned SectorCount) 20 | { 21 | if (m_FormatDescriptor.SectorSize == CD_SECTOR_SIZE) 22 | { 23 | ULONGLONG offset = m_FormatDescriptor.InitialOffset + ((ULONGLONG)FirstSector) * CD_SECTOR_SIZE; 24 | if (m_pFile->Seek(offset, FileFlags::FileBegin) != offset) 25 | return 0; 26 | return m_pFile->Read(pBuffer, SectorCount * CD_SECTOR_SIZE); 27 | } 28 | 29 | for (unsigned i = 0; i < SectorCount; i++) 30 | if (!ReadSectorFromFile(m_FormatDescriptor.InitialOffset + ((ULONGLONG)(FirstSector + i)) * m_FormatDescriptor.SectorSize, 31 | pBuffer, 32 | i * CD_SECTOR_SIZE)) 33 | return i * CD_SECTOR_SIZE; 34 | return SectorCount * CD_SECTOR_SIZE; 35 | } 36 | 37 | }; 38 | 39 | class IMGParser : public AICDImageFormatParser 40 | { 41 | public: 42 | virtual ProbeResult Probe(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath, bool SecondPass); 43 | virtual ManagedPointer OpenImage(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath); 44 | 45 | }; 46 | } -------------------------------------------------------------------------------- /ImageFormats/ImageFormats.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "ImageFormats.h" 3 | #include "IMGParser.h" 4 | #include "NRG/NRGParser.h" 5 | #include "MDS/MDSParser.h" 6 | #include "CUEParser.h" 7 | #include "CCDParser.h" 8 | 9 | using namespace ImageFormats; 10 | using namespace BazisLib; 11 | 12 | ImageFormatDatabase::ImageFormatDatabase() 13 | { 14 | //m_RegisteredParsers[_T("iso")] = new ISOParser(); //IMG parser is more accurate 15 | m_RegisteredParsers[_T("img")] = new IMGParser(); 16 | m_RegisteredParsers[_T("nrg")] = new NRGParser(); 17 | m_RegisteredParsers[_T("mds")] = new MDSParser(); 18 | m_RegisteredParsers[_T("cue")] = new CUEParser(); 19 | m_RegisteredParsers[_T("ccd")] = new CCDParser(); 20 | } 21 | 22 | ManagedPointer ImageFormatDatabase::FindParserByPrimaryFileExtension( const TempString &ParserName ) 23 | { 24 | ParserMap::iterator it = m_RegisteredParsers.find(ParserName); 25 | if (it == m_RegisteredParsers.end()) 26 | return NULL; 27 | return it->second; 28 | } 29 | 30 | ManagedPointer ImageFormatDatabase::OpenCDImage( const ConstManagedPointer &pFile, const String&FileName ) 31 | { 32 | if (!pFile || !pFile->Valid()) 33 | return NULL; 34 | ManagedPointer pParser; 35 | ProbeResult BestScore = NoMatch; 36 | TempString ext = Path::GetExtensionExcludingDot(FileName); 37 | 38 | //TODO: Implement third pass trying to detect internal FS structures 39 | for (int pass = 0; pass < 2; pass++) 40 | { 41 | for (ParserMap::iterator it = m_RegisteredParsers.begin(); it != m_RegisteredParsers.end(); it++) 42 | { 43 | ProbeResult score = it->second->Probe(ext, pFile, FileName, (pass != 0)); 44 | if (score > BestScore) 45 | { 46 | BestScore = score; 47 | pParser = it->second; 48 | } 49 | } 50 | 51 | if (pParser) 52 | { 53 | if (pass) 54 | return pParser->OpenImage(ext, pFile, FileName); 55 | 56 | //Decide whether we need a second format detection pass 57 | ProbeResult score2 = pParser->Probe(ext, pFile, FileName, true); 58 | if (score2 >= SufficientMatchToSkipOthers) 59 | return pParser->OpenImage(ext, pFile, FileName); 60 | } 61 | } 62 | 63 | return NULL; 64 | } 65 | 66 | bool ImageFormats::ImageFormatDatabase::IsAValidCDImageName( const String&filePath ) 67 | { 68 | TempString ext = Path::GetExtensionExcludingDot(filePath); 69 | 70 | for (ParserMap::iterator it = m_RegisteredParsers.begin(); it != m_RegisteredParsers.end(); it++) 71 | { 72 | if (it->second->Probe(ext, ManagedPointer(NULL), filePath, false) >= NameOnlyMatch) 73 | return true; 74 | } 75 | return false; 76 | } -------------------------------------------------------------------------------- /ImageFormats/ImageHelpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ImageFormats 4 | { 5 | static inline unsigned char bcd2int8(unsigned char bcd) 6 | { 7 | if ((bcd >= 0xA0) || ((bcd & 0x0F) >= 0x0A)) 8 | return bcd; 9 | return (((bcd & 0xF0) >> 4) * 10) + (bcd & 0x0F); 10 | } 11 | 12 | struct MSFAddress 13 | { 14 | UCHAR M; 15 | UCHAR S; 16 | UCHAR F; 17 | 18 | unsigned ToLBA() 19 | { 20 | return ((M * 60 + S) * 75 + F) - 150; 21 | } 22 | 23 | static inline MSFAddress MSF(UCHAR m, UCHAR s, UCHAR f) 24 | { 25 | MSFAddress addr = {m,s,f}; 26 | return addr; 27 | } 28 | 29 | static inline MSFAddress FromLBA(unsigned LBA) 30 | { 31 | MSFAddress addr; 32 | LBA += 150; 33 | addr.F = (UCHAR)(LBA % 75); 34 | LBA /= 75; 35 | addr.S = (UCHAR)(LBA % 60); 36 | addr.M = (UCHAR)(LBA / 60); 37 | return addr; 38 | } 39 | }; 40 | 41 | } -------------------------------------------------------------------------------- /ImageFormats/MDS/MDSFormats.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../ImageHelpers.h" 3 | 4 | namespace ImageFormats 5 | { 6 | #pragma pack(push, 1) 7 | 8 | struct MDSHeader 9 | { 10 | UCHAR Signature[16]; /* "MEDIA DESCRIPTOR" */ 11 | UCHAR Version[2]; /* Version ? */ 12 | USHORT MediumType; /* Medium type */ 13 | USHORT SessionCount; /* Number of sessions */ 14 | USHORT unused1[2]; 15 | USHORT BCALength; /* Length of BCA data (DVD-ROM) */ 16 | unsigned unused2[2]; 17 | unsigned BCAOffset; /* Offset to BCA data (DVD-ROM) */ 18 | unsigned unused3[6]; /* Probably more offsets */ 19 | unsigned DiskStructuresOffset; /* Offset to disc structures */ 20 | unsigned unused4[3]; /* Probably more offsets */ 21 | unsigned SessionsBlocksOffset; /* Offset to session blocks */ 22 | unsigned DpmBlocksOffset; /* offset to DPM data blocks */ 23 | unsigned EncryptionKeyOffset; 24 | }; /* length: 92 bytes */ 25 | 26 | C_ASSERT(sizeof(MDSHeader) == 92); 27 | 28 | struct MDSSessionBlock 29 | { 30 | int SessionStart; /* Session's start address */ 31 | int SessionEnd; /* Session's end address */ 32 | USHORT SessionNumber; /* (Unknown) */ 33 | UCHAR TotalBlockCount; /* Number of all data blocks. */ 34 | UCHAR LeadInBlockCount; /* Number of lead-in data blocks */ 35 | USHORT FirstTrack; /* Total number of sessions in image? */ 36 | USHORT LastTrack; /* Number of regular track data blocks. */ 37 | unsigned unused; /* (unknown) */ 38 | unsigned TrackBlocksOffset; /* Offset of lead-in+regular track data blocks. */ 39 | }; /* length: 24 bytes */ 40 | 41 | C_ASSERT(sizeof(MDSSessionBlock) == 24); 42 | 43 | struct MDSTrackBlock 44 | { 45 | UCHAR Mode; /* Track mode */ 46 | UCHAR SubchannelMode; /* Subchannel mode */ 47 | UCHAR AdrCtk; /* Adr/Ctl */ 48 | UCHAR unused1; /* Track flags? */ 49 | UCHAR TrackNumber; /* Track number. (>0x99 is lead-in track) */ 50 | 51 | unsigned unused2; 52 | MSFAddress MSF; 53 | unsigned ExtraOffset; /* Start offset of this track's extra block. */ 54 | USHORT SectorSize; /* Sector size. */ 55 | 56 | UCHAR unused3[18]; 57 | unsigned StartSector; /* Track start sector (PLBA). */ 58 | ULONGLONG StartOffset; /* Track start offset. */ 59 | UCHAR Session; /* Session or index? */ 60 | UCHAR unused4[3]; 61 | unsigned FooterOffset; /* Start offset of footer. */ 62 | UCHAR unused5[24]; 63 | }; /* length: 80 bytes */ 64 | 65 | C_ASSERT(sizeof(MDSTrackBlock) == 80); 66 | 67 | struct MDSTrackExtraBlock 68 | { 69 | unsigned Pregap; /* Number of sectors in pregap. */ 70 | unsigned Length; /* Number of sectors in track. */ 71 | }; /* length: 8 bytes */ 72 | 73 | C_ASSERT(sizeof(MDSTrackExtraBlock) == 8); 74 | 75 | struct MDSFooter 76 | { 77 | unsigned FilenameOffset; /* Start offset of image filename. */ 78 | unsigned WidecharFilename; /* Seems to be set to 1 if widechar filename is used */ 79 | unsigned unused1; 80 | unsigned unused2; 81 | }; /* length: 16 bytes */ 82 | 83 | C_ASSERT(sizeof(MDSFooter) == 16); 84 | 85 | #pragma pack(pop) 86 | } -------------------------------------------------------------------------------- /ImageFormats/MDS/MDSParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../ImageFormats.h" 3 | 4 | namespace ImageFormats 5 | { 6 | class MDSParser : public AICDImageFormatParser 7 | { 8 | public: 9 | virtual ProbeResult Probe(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath, bool SecondPass); 10 | virtual ManagedPointer OpenImage(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath); 11 | }; 12 | } -------------------------------------------------------------------------------- /ImageFormats/MDS/MDSRecordSet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/ImageFormats/MDS/MDSRecordSet.h -------------------------------------------------------------------------------- /ImageFormats/NRG/NRGParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../ImageFormats.h" 3 | 4 | namespace ImageFormats 5 | { 6 | class NRGParser : public AICDImageFormatParser 7 | { 8 | public: 9 | virtual ProbeResult Probe(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath, bool SecondPass); 10 | virtual ManagedPointer OpenImage(const TempString &FileExtension, const ConstManagedPointer &pFile, const String&FullFilePath); 11 | }; 12 | } -------------------------------------------------------------------------------- /ImageFormats/NRG/NRGRecordSet.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | namespace ImageFormats 8 | { 9 | using namespace BazisLib; 10 | 11 | #define _R(val) ((((val) & 0xFF000000) >> 24) | (((val) & 0x00FF0000) >> 8) | (((val) & 0x0000FF00) << 8) | (((val) & 0x000000FF) << 24)) 12 | 13 | enum NRGRecordType //Just to see things better in the debugger 14 | { 15 | NRG_CUEX = _R('CUEX'), 16 | NRG_CUES = _R('CUES'), 17 | NRG_ETN2 = _R('ETN2'), 18 | NRG_ETNF = _R('ETNF'), 19 | NRG_DAOX = _R('DAOX'), 20 | NRG_DAOI = _R('DAOI'), 21 | NRG_CDTX = _R('CDTX'), 22 | NRG_SINF = _R('SINF'), 23 | NRG_MTYP = _R('MTYP'), 24 | }; 25 | 26 | class NRGRecordSet 27 | { 28 | private: 29 | CBuffer m_RawRecords; 30 | 31 | public: 32 | struct RawRecordHeader 33 | { 34 | NRGRecordType ID; 35 | unsigned SizeMSB; 36 | }; 37 | 38 | struct RecordData 39 | { 40 | void *pRecord; 41 | size_t Size; 42 | }; 43 | 44 | typedef std::map> RecordMap; 45 | RecordMap Records; 46 | bool OldFormat; 47 | 48 | public: 49 | NRGRecordSet(const ConstManagedPointer &pFile) 50 | : OldFormat(false) 51 | { 52 | if (!pFile) 53 | return; 54 | ULONGLONG baseOffset = 0; 55 | 56 | unsigned signature = 0; 57 | pFile->Seek(-12LL, FileFlags::FileEnd); 58 | pFile->Read(&signature, sizeof(signature)); 59 | if (signature == _R('NER5')) 60 | { 61 | pFile->Read(&baseOffset, sizeof(baseOffset)); 62 | baseOffset = SwapByteOrder64(baseOffset); 63 | } 64 | else 65 | { 66 | pFile->Read(&signature, sizeof(signature)); 67 | if (signature != _R('NERO')) 68 | return; 69 | OldFormat = true; 70 | unsigned off32 = 0; 71 | pFile->Read(&off32, sizeof(off32)); 72 | baseOffset = SwapByteOrder32(off32); 73 | } 74 | if (!baseOffset) 75 | return; 76 | 77 | unsigned recBlockSize = (unsigned)(pFile->GetSize() - baseOffset); 78 | if (recBlockSize > (1024 * 1024)) 79 | return; 80 | if (!m_RawRecords.EnsureSize(recBlockSize)) 81 | return; 82 | if (pFile->Seek(baseOffset, FileFlags::FileBegin) != baseOffset) 83 | return; 84 | if (pFile->Read(m_RawRecords.GetData(), m_RawRecords.GetAllocated()) != m_RawRecords.GetAllocated()) 85 | return; 86 | m_RawRecords.SetSize(recBlockSize); 87 | 88 | void *pRawEnd = ((char *)m_RawRecords.GetData()) + recBlockSize; 89 | 90 | for (RawRecordHeader *pRec = (RawRecordHeader *)m_RawRecords.GetData(); 91 | (pRec < pRawEnd) && (pRec->ID != _R('END!')); 92 | pRec = ((RawRecordHeader *)(((char *)(pRec + 1)) + SwapByteOrder32(pRec->SizeMSB)))) 93 | { 94 | RecordData rec = {pRec + 1, SwapByteOrder32(pRec->SizeMSB)}; 95 | Records[pRec->ID].push_back(rec); 96 | } 97 | } 98 | 99 | RecordData *LookupRecord(NRGRecordType type, unsigned index = 0) 100 | { 101 | RecordMap::iterator it = Records.find(type); 102 | if (it == Records.end()) 103 | return NULL; 104 | if (index >= it->second.size()) 105 | return NULL; 106 | return &it->second[index]; 107 | } 108 | 109 | bool Valid() 110 | { 111 | return !Records.empty(); 112 | } 113 | }; 114 | } -------------------------------------------------------------------------------- /ImageFormats/NRG/NRGStructures.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../ImageHelpers.h" 3 | 4 | namespace ImageFormats 5 | { 6 | #pragma pack(push, 1) 7 | struct NRGCueBlock 8 | { 9 | UCHAR AdrCtl; 10 | UCHAR Track; 11 | UCHAR Index; 12 | UCHAR unused; 13 | union 14 | { 15 | unsigned StartSector; 16 | MSFAddress MSF; 17 | }; 18 | }; 19 | 20 | C_ASSERT(sizeof(NRGCueBlock) == 8); 21 | 22 | struct NRGDAOHeader 23 | { 24 | unsigned unused1; 25 | UCHAR mcn[13]; 26 | UCHAR unused2; 27 | UCHAR SessionType; /* ? */ 28 | UCHAR NumSessions; /* ? */ 29 | UCHAR FirstTrack; 30 | UCHAR LastTrack; 31 | }; 32 | 33 | C_ASSERT(sizeof(NRGDAOHeader) == 22); 34 | 35 | template struct _NRGDAOEntry 36 | { 37 | UCHAR ISRC[12]; 38 | USHORT SectorSize; 39 | UCHAR ModeCode; 40 | UCHAR unused[3]; 41 | /* The following fields are 32-bit in old format and 64-bit in new format */ 42 | _OffsetType PregapOffset; /* Pregap offset in file */ 43 | _OffsetType StartOffset; /* Track start offset in file */ 44 | _OffsetType EndOffset; /* Track end offset */ 45 | }; 46 | 47 | C_ASSERT(sizeof(_NRGDAOEntry) == 42); 48 | C_ASSERT(sizeof(_NRGDAOEntry) == 30); 49 | 50 | template struct _NRGETNEntry 51 | { 52 | _OffsetType Offset; 53 | _OffsetType Size; 54 | UCHAR unused1[3]; 55 | UCHAR Mode; 56 | unsigned Sector; 57 | _OffsetType unused2; 58 | }; 59 | 60 | C_ASSERT(sizeof(_NRGETNEntry) == 32); 61 | C_ASSERT(sizeof(_NRGETNEntry) == 20); 62 | 63 | #pragma pack(pop) 64 | } -------------------------------------------------------------------------------- /ImageFormats/RawCDFormats.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct RawCDFormatDescriptor 6 | { 7 | unsigned SectorSize; 8 | unsigned InitialOffset; 9 | }; 10 | 11 | bool DetectRawCDFormat(const BazisLib::ConstManagedPointer &pFile, RawCDFormatDescriptor *pDesc); 12 | BazisLib::ActionStatus ParseCUEFile(const BazisLib::String &OriginalPath, BazisLib::String *pBinaryPath, const BazisLib::ManagedPointer &pFile, RawCDFormatDescriptor *pDesc); 13 | 14 | unsigned DetectDataOffsetInSector(const BazisLib::ConstManagedPointer &pFile, unsigned SectorSize, unsigned DefaultOffset, ULONGLONG FirstSectorOffset = 0); 15 | -------------------------------------------------------------------------------- /ImageFormats/UDFAnalyzer.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "UDFAnalyzer.h" 3 | #include "Filesystems/miniudf.h" 4 | #include 5 | 6 | using namespace BazisLib; 7 | using namespace ImageFormats; 8 | 9 | #ifndef _DDK_ 10 | 11 | namespace 12 | { 13 | class ParsedImageWrapper : public IDisc 14 | { 15 | private: 16 | ManagedPointer m_pImage; 17 | unsigned m_FirstSector, m_TrackEnd; 18 | 19 | public: 20 | ParsedImageWrapper(ManagedPointer pImg, unsigned track) 21 | : m_pImage(pImg) 22 | , m_FirstSector(0) 23 | , m_TrackEnd(0) 24 | { 25 | if (track > 0) 26 | m_FirstSector = pImg->GetTrackEndSector(track - 1); 27 | m_TrackEnd = pImg->GetTrackEndSector(track); 28 | } 29 | 30 | virtual bool ReadSector(unsigned sectorIndex, void *pBuffer, size_t sectorSize) override 31 | { 32 | if (sectorIndex >= (m_TrackEnd - m_FirstSector)) 33 | return false; 34 | if (sectorSize != 2048) 35 | return false; 36 | return (m_pImage->ReadSectorsBoundsChecked(m_FirstSector + sectorIndex, pBuffer, 1) == 2048); 37 | } 38 | 39 | }; 40 | } 41 | 42 | UDFAnalysisResult AnalyzeUDFImage(const BazisLib::ManagedPointer &pImg) 43 | { 44 | std::auto_ptr pWrapper(new ParsedImageWrapper(pImg, 0)); 45 | UDFDisc disc(pWrapper.get()); 46 | 47 | UDFAnalysisResult result = {false,}; 48 | 49 | if (!disc.ParseUDFHeaders()) 50 | return result; 51 | 52 | UDFDisc::LogicalVolume *pVol = disc.FindLastVolume(); 53 | if (!pVol) 54 | return result; 55 | 56 | result.isUDF = true; 57 | result.foundBDMV = disc.FindFileInDirectory(pVol, pVol->RootDirectory, L"BDMV", false).Valid(); 58 | result.foundVIDEO_TS = disc.FindFileInDirectory(pVol, pVol->RootDirectory, L"VIDEO_TS", false).Valid(); 59 | 60 | return result; 61 | } 62 | 63 | #endif -------------------------------------------------------------------------------- /ImageFormats/UDFAnalyzer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ImageFormats.h" 3 | 4 | struct UDFAnalysisResult 5 | { 6 | bool foundBDMV; 7 | bool foundVIDEO_TS; 8 | bool isUDF; 9 | }; 10 | 11 | UDFAnalysisResult AnalyzeUDFImage(const BazisLib::ManagedPointer &pImg); -------------------------------------------------------------------------------- /ImageFormats/stdafx.cpp: -------------------------------------------------------------------------------- 1 | //This file is used to build a precompiled header 2 | #include "stdafx.h" -------------------------------------------------------------------------------- /ImageFormats/stdafx.h: -------------------------------------------------------------------------------- 1 | #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 2 | #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. 3 | #endif 4 | 5 | #ifdef _DDK_ 6 | 7 | #include 8 | #else 9 | #define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY 10 | #include 11 | #include 12 | #include 13 | #endif -------------------------------------------------------------------------------- /InstallerStub/CustomInstaller.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../../svn/win32/installer/ssibase/ssibase.h" 3 | #include 4 | 5 | class CustomInstaller : public CInstallationPacketInstaller 6 | { 7 | private: 8 | BazisLib::FunctionThread m_InstallThread; 9 | HWND m_hWnd; 10 | bool m_bExtOptionsVisible; 11 | bool m_bUnattended; 12 | 13 | public: 14 | virtual bool PerformInstallation(const char *ComponentOverrideString = 0, bool Unattended = false); 15 | 16 | CustomInstaller(HINSTANCE hInst, char *pszSourceFile, ULONGLONG InitialOffset) 17 | : CInstallationPacketInstaller(hInst, pszSourceFile, InitialOffset) 18 | , m_InstallThread(&InstallationThread, this) 19 | , m_bExtOptionsVisible(true) 20 | , m_bUnattended(false) 21 | { 22 | } 23 | 24 | enum {WMX_DONE = WM_USER + 67}; //wParam = bSuccessful 25 | 26 | protected: 27 | virtual bool OnPartialCompletion(int FileIndex, 28 | ULONGLONG FileSize, 29 | ULONGLONG BytesDone, 30 | ULONGLONG TotalSize, 31 | ULONGLONG TotalDone); 32 | 33 | virtual bool OnNextFile(char *pszFileName); 34 | 35 | private: 36 | static BOOL CALLBACK sInstallerDialogProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); 37 | BOOL InstallerDialogProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); 38 | 39 | static int InstallationThread(LPVOID lpParam); 40 | 41 | void UpdateInstallationState(bool running); 42 | 43 | virtual void OnPostInstallCommand(PCOMMAND pCommand); 44 | void ShowExtendedOptions(bool bShow); 45 | 46 | private: 47 | void ApplyCustomSettings(); 48 | }; 49 | -------------------------------------------------------------------------------- /InstallerStub/InstallerStub.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /InstallerStub/InstallerStub.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/InstallerStub/InstallerStub.ico -------------------------------------------------------------------------------- /InstallerStub/InstallerStub.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | 46 | 47 | Resource Files 48 | 49 | 50 | Resource Files 51 | 52 | 53 | Resource Files 54 | 55 | 56 | Resource Files 57 | 58 | 59 | 60 | 61 | 62 | Resource Files 63 | 64 | 65 | -------------------------------------------------------------------------------- /InstallerStub/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 APPLICATION : InstallerStub Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this InstallerStub application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your InstallerStub application. 9 | 10 | 11 | InstallerStub.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | InstallerStub.cpp 18 | This is the main application source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | AppWizard has created the following resources: 22 | 23 | InstallerStub.rc 24 | This is a listing of all of the Microsoft Windows resources that the 25 | program uses. It includes the icons, bitmaps, and cursors that are stored 26 | in the RES subdirectory. This file can be directly edited in Microsoft 27 | Visual C++. 28 | 29 | Resource.h 30 | This is the standard header file, which defines new resource IDs. 31 | Microsoft Visual C++ reads and updates this file. 32 | 33 | InstallerStub.ico 34 | This is an icon file, which is used as the application's icon (32x32). 35 | This icon is included by the main resource file InstallerStub.rc. 36 | 37 | small.ico 38 | This is an icon file, which contains a smaller version (16x16) 39 | of the application's icon. This icon is included by the main resource 40 | file InstallerStub.rc. 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | Other standard files: 44 | 45 | StdAfx.h, StdAfx.cpp 46 | These files are used to build a precompiled header (PCH) file 47 | named InstallerStub.pch and a precompiled types file named StdAfx.obj. 48 | 49 | ///////////////////////////////////////////////////////////////////////////// 50 | Other notes: 51 | 52 | AppWizard uses "TODO:" comments to indicate parts of the source code you 53 | should add to or customize. 54 | 55 | ///////////////////////////////////////////////////////////////////////////// 56 | -------------------------------------------------------------------------------- /InstallerStub/box.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/InstallerStub/box.ico -------------------------------------------------------------------------------- /InstallerStub/chbox.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/InstallerStub/chbox.ico -------------------------------------------------------------------------------- /InstallerStub/compat.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /InstallerStub/ico203.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/InstallerStub/ico203.ico -------------------------------------------------------------------------------- /InstallerStub/installer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/InstallerStub/installer.ico -------------------------------------------------------------------------------- /InstallerStub/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by InstallerStub.rc 4 | // 5 | #define IDC_MYICON 2 6 | #define IDD_INSTALLERSTUB_DIALOG 102 7 | #define IDR_MAINFRAME 128 8 | #define IDD_INSTALLDLG 129 9 | #define IDB_BITMAP1 131 10 | #define IDB_BITMAP2 133 11 | #define IDI_ICON2 1 12 | #define IDC_PROGRESS1 1001 13 | #define IDC_ICON1 1002 14 | #define IDC_CAPTION 1003 15 | #define IDC_EDIT1 1004 16 | #define IDC_CHECK1 1005 17 | #define IDC_INSTALLDIR 1006 18 | #define IDC_CHECK2 1007 19 | #define IDC_GROUPBOX1 1008 20 | #define IDC_INSTSTATUS 1009 21 | #define IDC_SYSLINK1 1010 22 | #define IDC_SYSLINK2 1011 23 | #define IDI_ICON1 1132 24 | #define IDC_STATIC -1 25 | #define IDC_DIRLABEL -1 26 | 27 | // Next default values for new objects 28 | // 29 | #ifdef APSTUDIO_INVOKED 30 | #ifndef APSTUDIO_READONLY_SYMBOLS 31 | #define _APS_NO_MFC 1 32 | #define _APS_NEXT_RESOURCE_VALUE 135 33 | #define _APS_NEXT_COMMAND_VALUE 32771 34 | #define _APS_NEXT_CONTROL_VALUE 1012 35 | #define _APS_NEXT_SYMED_VALUE 110 36 | #endif 37 | #endif 38 | -------------------------------------------------------------------------------- /InstallerStub/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/InstallerStub/small.ico -------------------------------------------------------------------------------- /InstallerStub/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // InstallerStub.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /InstallerStub/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define OEMRESOURCE 11 | 12 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 13 | // Windows Header Files: 14 | #include 15 | #include 16 | 17 | // C RunTime Header Files 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | 24 | // TODO: reference additional headers your program requires here 25 | -------------------------------------------------------------------------------- /InstallerStub/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef WINVER // Specifies that the minimum required platform is Windows Vista. 11 | #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 15 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 16 | #endif 17 | 18 | #ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. 19 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. 20 | #endif 21 | 22 | #ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. 23 | #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. 24 | #endif 25 | -------------------------------------------------------------------------------- /InstallerStub/versioninfo.h: -------------------------------------------------------------------------------- 1 | #include "../wcdversion.h" 2 | 3 | VS_VERSION_INFO VERSIONINFO 4 | FILEVERSION WINCDEMU_VERSION 5 | PRODUCTVERSION WINCDEMU_VERSION 6 | FILEFLAGSMASK 0x17L 7 | #ifdef _DEBUG 8 | FILEFLAGS 0x1L 9 | #else 10 | FILEFLAGS 0x0L 11 | #endif 12 | FILEOS 0x4L 13 | FILETYPE 0x1L 14 | FILESUBTYPE 0x0L 15 | BEGIN 16 | BLOCK "StringFileInfo" 17 | BEGIN 18 | BLOCK "000004b0" 19 | BEGIN 20 | VALUE "Comments", COMMENTS_STR 21 | VALUE "CompanyName", COMPANY_STR 22 | VALUE "FileDescription", "WinCDEmu installer" 23 | VALUE "FileVersion", WINCDEMU_VERSION_STR 24 | VALUE "LegalCopyright", COPYRIGHT_STR 25 | VALUE "LegalTrademarks", TRADEMARKS_STR 26 | VALUE "OriginalFilename", "WinCDEmu-installer.exe" 27 | VALUE "ProductName", PRODUCTNAME_STR 28 | VALUE "ProductVersion", WINCDEMU_VERSION_STR 29 | END 30 | END 31 | BLOCK "VarFileInfo" 32 | BEGIN 33 | VALUE "Translation", 0x0, 1200 34 | END 35 | END 36 | 37 | -------------------------------------------------------------------------------- /InstallerStub/wcd-icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/InstallerStub/wcd-icon.ico -------------------------------------------------------------------------------- /InstallerStub/wcd-icon128.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/InstallerStub/wcd-icon128.bmp -------------------------------------------------------------------------------- /Uninstall/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | CONSOLE APPLICATION : uninstall Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this uninstall application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your uninstall application. 9 | 10 | 11 | uninstall.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | uninstall.cpp 18 | This is the main application source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named uninstall.pch and a precompiled types file named StdAfx.obj. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other notes: 29 | 30 | AppWizard uses "TODO:" comments to indicate parts of the source code you 31 | should add to or customize. 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | -------------------------------------------------------------------------------- /Uninstall/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // uninstall.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /Uninstall/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | -------------------------------------------------------------------------------- /Uninstall/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /Uninstall/uninstall.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | ACTIVE TEMPLATE LIBRARY : VirtualAutorunDisabler Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this VirtualAutorunDisabler project for you to use as the starting point for 6 | writing your Executable (EXE). 7 | 8 | This file contains a summary of what you will find in each of the files that 9 | make up your project. 10 | 11 | VirtualAutorunDisabler.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | VirtualAutorunDisabler.idl 18 | This file contains the IDL definitions of the type library, the interfaces 19 | and co-classes defined in your project. 20 | This file will be processed by the MIDL compiler to generate: 21 | C++ interface definitions and GUID declarations (VirtualAutorunDisabler.h) 22 | GUID definitions (VirtualAutorunDisabler_i.c) 23 | A type library (VirtualAutorunDisabler.tlb) 24 | Marshaling code (VirtualAutorunDisabler_p.c and dlldata.c) 25 | 26 | VirtualAutorunDisabler.h 27 | This file contains the C++ interface definitions and GUID declarations of the 28 | items defined in VirtualAutorunDisabler.idl. It will be regenerated by MIDL during compilation. 29 | 30 | VirtualAutorunDisabler.cpp 31 | This file contains the object map and the implementation of WinMain. 32 | 33 | VirtualAutorunDisabler.rc 34 | This is a listing of all of the Microsoft Windows resources that the 35 | program uses. 36 | 37 | 38 | ///////////////////////////////////////////////////////////////////////////// 39 | Other standard files: 40 | 41 | StdAfx.h, StdAfx.cpp 42 | These files are used to build a precompiled header (PCH) file 43 | named VirtualAutorunDisabler.pch and a precompiled types file named StdAfx.obj. 44 | 45 | Resource.h 46 | This is the standard header file that defines resource IDs. 47 | 48 | 49 | ///////////////////////////////////////////////////////////////////////////// 50 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisabler.cpp: -------------------------------------------------------------------------------- 1 | // VirtualAutorunDisabler.cpp : Implementation of WinMain 2 | 3 | 4 | #include "stdafx.h" 5 | #include "resource.h" 6 | #include "VirtualAutorunDisabler_i.h" 7 | 8 | 9 | class CVirtualAutorunDisablerModule : public CAtlExeModuleT< CVirtualAutorunDisablerModule > 10 | { 11 | public : 12 | DECLARE_LIBID(LIBID_VirtualAutorunDisablerLib) 13 | DECLARE_REGISTRY_APPID_RESOURCEID(IDR_VIRTUALAUTORUNDISABLER, "{6C50E507-74A2-4434-95A6-53563A797FF6}") 14 | }; 15 | 16 | CVirtualAutorunDisablerModule _AtlModule; 17 | 18 | 19 | 20 | // 21 | extern "C" int WINAPI _tWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, 22 | LPTSTR /*lpCmdLine*/, int nShowCmd) 23 | { 24 | return _AtlModule.WinMain(nShowCmd); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisabler.idl: -------------------------------------------------------------------------------- 1 | // VirtualAutorunDisabler.idl : IDL source for VirtualAutorunDisabler 2 | // 3 | 4 | // This file will be processed by the MIDL tool to 5 | // produce the type library (VirtualAutorunDisabler.tlb) and marshalling code. 6 | 7 | import "oaidl.idl"; 8 | import "ocidl.idl"; 9 | import "shobjidl.idl"; 10 | 11 | [ 12 | object, 13 | uuid(57C052A7-AAD7-4230-860D-F6768C8EA59F), 14 | helpstring("IVirtualAutorunDisablingMonitor Interface"), 15 | pointer_default(unique) 16 | ] 17 | interface IVirtualAutorunDisablingMonitor : IUnknown{ 18 | HRESULT InitializeMonitorAndResetWatchdog(); 19 | HRESULT TerminateServer(); 20 | }; 21 | 22 | [ 23 | object, 24 | uuid(466a44dc-ad3b-4573-bdc4-0686bbfb7a23), 25 | helpstring("For internal use only. Do not use."), 26 | pointer_default(unique) 27 | ] 28 | interface IVirtualAutorunDisablingMonitorInternal : IUnknown{ 29 | HRESULT CheckForTimeout([in] int PID); 30 | }; 31 | 32 | [ 33 | uuid(D2243491-B0DF-40CC-9973-9E401631D770), 34 | version(1.0), 35 | helpstring("VirtualAutorunDisabler 1.0 Type Library") 36 | ] 37 | library VirtualAutorunDisablerLib 38 | { 39 | importlib("stdole2.tlb"); 40 | [ 41 | uuid(04DDC073-352E-447D-8A83-3E1FD9D41E61), 42 | helpstring("VirtualAutorunDisablingMonitor Class") 43 | ] 44 | coclass VirtualAutorunDisablingMonitor 45 | { 46 | [default] interface IVirtualAutorunDisablingMonitor; 47 | interface IQueryCancelAutoPlay; 48 | interface IVirtualAutorunDisablingMonitorInternal; 49 | }; 50 | }; 51 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisabler.rgs: -------------------------------------------------------------------------------- 1 | HKCR 2 | { 3 | NoRemove AppID 4 | { 5 | '%APPID%' = s 'VirtualAutorunDisabler' 6 | { 7 | val ROTFlags = d 1 8 | } 9 | 10 | 'VirtualAutorunDisabler.EXE' 11 | { 12 | val AppID = s '%APPID%' 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisabler.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | {0fb12eb1-1338-43f7-9c72-395e75a63dc2} 18 | False 19 | 20 | 21 | 22 | 23 | Source Files 24 | 25 | 26 | Source Files 27 | 28 | 29 | Source Files 30 | 31 | 32 | Generated Files 33 | 34 | 35 | 36 | 37 | Source Files 38 | 39 | 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Generated Files 55 | 56 | 57 | 58 | 59 | Resource Files 60 | 61 | 62 | 63 | 64 | Resource Files 65 | 66 | 67 | Resource Files 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisablerPS.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {8093d6c4-1c88-431d-81d7-6db33559c381} 6 | 7 | 8 | {43e6a5c3-f86a-47cf-aeba-266b2da8a5c2} 9 | False 10 | 11 | 12 | 13 | 14 | Generated Files 15 | 16 | 17 | Generated Files 18 | 19 | 20 | Generated Files 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisabler_p.c: -------------------------------------------------------------------------------- 1 | #ifdef _M_AMD64 2 | #include "VirtualAutorunDisabler_p64.c" 3 | #else 4 | #include "VirtualAutorunDisabler_p32.c" 5 | #endif -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisablerps.def: -------------------------------------------------------------------------------- 1 | 2 | LIBRARY "VirtualAutorunDisablerPS" 3 | 4 | EXPORTS 5 | DllGetClassObject PRIVATE 6 | DllCanUnloadNow PRIVATE 7 | DllRegisterServer PRIVATE 8 | DllUnregisterServer PRIVATE 9 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisablingMonitor.cpp: -------------------------------------------------------------------------------- 1 | // VirtualAutorunDisablingMonitor.cpp : Implementation of CVirtualAutorunDisablingMonitor 2 | 3 | #include "stdafx.h" 4 | #include "VirtualAutorunDisablingMonitor.h" 5 | #include "../VirtualCDCtl/VirtualDriveClient.h" 6 | 7 | using namespace BazisLib; 8 | 9 | // CVirtualAutorunDisablingMonitor 10 | 11 | 12 | HRESULT STDMETHODCALLTYPE CVirtualAutorunDisablingMonitor::AllowAutoPlay(/* [string][in] */ __RPC__in LPCWSTR pszPath, /* [in] */ DWORD dwContentType, /* [string][in] */ __RPC__in LPCWSTR pszLabel, /* [in] */ DWORD dwSerialNumber) 13 | { 14 | wchar_t wszPath[] = L"\\\\.\\0:"; 15 | 16 | if (GetDriveType(pszPath) != DRIVE_CDROM) 17 | return S_OK; 18 | 19 | if (!pszPath[0]) 20 | return E_INVALIDARG; 21 | 22 | wszPath[4] = pszPath[0]; 23 | ActionStatus status; 24 | VirtualDriveClient client(wszPath, &status); 25 | if (!client.IsAutorunSuppressionFlagged()) 26 | return S_OK; 27 | 28 | m_CurrentState = stRunning; 29 | ResetTimeout(); 30 | return S_FALSE; 31 | } 32 | 33 | HRESULT STDMETHODCALLTYPE CVirtualAutorunDisablingMonitor::InitializeMonitorAndResetWatchdog(void) 34 | { 35 | if (m_CurrentState == stInit) 36 | return HRESULT_FROM_WIN32(ERROR_RETRY); //The watchdog thread has not initialized yet. Hold the existing reference and retry attempt. 37 | 38 | if (m_CurrentState == stHardTermination) 39 | return E_ABORT; //The current server is terminating. The caller should release the reference, call CoCreateInstance() again and retry. 40 | 41 | if (!SUCCEEDED(m_ROTRegisterResult)) 42 | return m_ROTRegisterResult; 43 | 44 | m_CurrentState = stRunning; 45 | ResetTimeout(); 46 | return S_OK; 47 | } 48 | 49 | HRESULT CVirtualAutorunDisablingMonitor::TerminateServer() 50 | { 51 | m_CurrentState = stHardTermination; 52 | PostQuitMessage(0); 53 | return S_OK; 54 | } 55 | 56 | int CVirtualAutorunDisablingMonitor::WatchdogThreadBody(void *pArg) 57 | { 58 | CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); 59 | enum {kPollingPeriod = (kTimeoutInSeconds * 1000) / 2}; 60 | CComPtr pMonitor; 61 | do 62 | { 63 | HRESULT hR; 64 | if (pMonitor == NULL) 65 | hR = pMonitor.CoCreateInstance(CLSID_VirtualAutorunDisablingMonitor); 66 | if (pMonitor == NULL) 67 | continue; 68 | 69 | hR = pMonitor->CheckForTimeout(GetCurrentProcessId()); 70 | if (hR != S_OK) 71 | pMonitor = NULL; 72 | 73 | } while (!((CVirtualAutorunDisablingMonitor *)pArg)->m_ThreadStopEvent.TryWait(kPollingPeriod)); 74 | 75 | return 0; 76 | } 77 | 78 | HRESULT STDMETHODCALLTYPE CVirtualAutorunDisablingMonitor::CheckForTimeout(int PID) 79 | { 80 | if (PID != GetCurrentProcessId()) 81 | return E_INVALIDARG; 82 | 83 | if (m_CurrentState == stInit) 84 | m_CurrentState = stRunning; 85 | 86 | //Returned S_FALSE means "watchdog thread should release the handle" 87 | if (m_TimeoutResetTime.MillisecondsElapsed() < (kTimeoutInSeconds * 1000)) 88 | return (m_CurrentState == stRunning) ? S_OK : S_FALSE; //Time-out not expired yet 89 | 90 | switch(m_CurrentState) 91 | { 92 | case stRunning: 93 | m_CurrentState = stSoftTermination; 94 | ResetTimeout(); 95 | return S_FALSE; 96 | case stSoftTermination: 97 | default: 98 | m_CurrentState = stHardTermination; 99 | TerminateServer(); 100 | return S_FALSE; 101 | } 102 | } -------------------------------------------------------------------------------- /VirtualAutorunDisabler/VirtualAutorunDisablingMonitor.rgs: -------------------------------------------------------------------------------- 1 | HKCR 2 | { 3 | VirtualAutorunDisabler.VirtualAutorun.1 = s 'VirtualAutorunDisablingMonitor Class' 4 | { 5 | CLSID = s '{04DDC073-352E-447D-8A83-3E1FD9D41E61}' 6 | } 7 | VirtualAutorunDisabler.VirtualAutorunDi = s 'VirtualAutorunDisablingMonitor Class' 8 | { 9 | CLSID = s '{04DDC073-352E-447D-8A83-3E1FD9D41E61}' 10 | CurVer = s 'VirtualAutorunDisabler.VirtualAutorun.1' 11 | } 12 | NoRemove CLSID 13 | { 14 | ForceRemove {04DDC073-352E-447D-8A83-3E1FD9D41E61} = s 'VirtualAutorunDisablingMonitor Class' 15 | { 16 | ProgID = s 'VirtualAutorunDisabler.VirtualAutorun.1' 17 | VersionIndependentProgID = s 'VirtualAutorunDisabler.VirtualAutorunDi' 18 | LocalServer32 = s '%MODULE%' 19 | 'TypeLib' = s '{D2243491-B0DF-40CC-9973-9E401631D770}' 20 | } 21 | } 22 | } 23 | 24 | HKLM 25 | { 26 | NoRemove SOFTWARE 27 | { 28 | NoRemove Microsoft 29 | { 30 | NoRemove Windows 31 | { 32 | NoRemove CurrentVersion 33 | { 34 | NoRemove Explorer 35 | { 36 | NoRemove AutoplayHandlers 37 | { 38 | NoRemove CancelAutoplay 39 | { 40 | NoRemove CLSID 41 | { 42 | val '04DDC073-352E-447D-8A83-3E1FD9D41E61' = s '' 43 | } 44 | } 45 | } 46 | } 47 | } 48 | } 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /VirtualAutorunDisabler/dlldata.c: -------------------------------------------------------------------------------- 1 | /********************************************************* 2 | DllData file -- generated by MIDL compiler 3 | 4 | DO NOT ALTER THIS FILE 5 | 6 | This file is regenerated by MIDL on every IDL file compile. 7 | 8 | To completely reconstruct this file, delete it and rerun MIDL 9 | on all the IDL files in this DLL, specifying this file for the 10 | /dlldata command line option 11 | 12 | *********************************************************/ 13 | 14 | 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | EXTERN_PROXY_FILE( VirtualAutorunDisabler ) 22 | 23 | 24 | PROXYFILE_LIST_START 25 | /* Start of list */ 26 | REFERENCE_PROXY_FILE( VirtualAutorunDisabler ), 27 | /* End of list */ 28 | PROXYFILE_LIST_END 29 | 30 | 31 | DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) 32 | 33 | #ifdef __cplusplus 34 | } /*extern "C" */ 35 | #endif 36 | 37 | /* end of generated dlldata file */ 38 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by VirtualAutorunDisabler.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | #define IDR_VIRTUALAUTORUNDISABLER 101 7 | #define IDR_VIRTUALAUTORUNDISABLINGMONITOR 102 8 | 9 | // Next default values for new objects 10 | // 11 | #ifdef APSTUDIO_INVOKED 12 | #ifndef APSTUDIO_READONLY_SYMBOLS 13 | #define _APS_NEXT_RESOURCE_VALUE 201 14 | #define _APS_NEXT_COMMAND_VALUE 32768 15 | #define _APS_NEXT_CONTROL_VALUE 201 16 | #define _APS_NEXT_SYMED_VALUE 103 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // VirtualAutorunDisabler.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, 3 | // but are changed infrequently 4 | 5 | #pragma once 6 | 7 | #ifndef STRICT 8 | #define STRICT 9 | #endif 10 | 11 | #include "targetver.h" 12 | 13 | #define _ATL_APARTMENT_THREADED 14 | #define _ATL_NO_AUTOMATIC_NAMESPACE 15 | 16 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit 17 | 18 | #include "resource.h" 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #define ASSERT assert 25 | 26 | using namespace ATL; 27 | -------------------------------------------------------------------------------- /VirtualAutorunDisabler/targetver.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | // The following macros define the minimum required platform. The minimum required platform 5 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 6 | // your application. The macros work by enabling all features available on platform versions up to and 7 | // including the version specified. 8 | 9 | // Modify the following defines if you have to target a platform prior to the ones specified below. 10 | // Refer to MSDN for the latest info on corresponding values for different platforms. 11 | #ifndef WINVER // Specifies that the minimum required platform is Windows Vista. 12 | #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. 13 | #endif 14 | 15 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 16 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 17 | #endif 18 | 19 | #ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. 20 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. 21 | #endif 22 | 23 | #ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. 24 | #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /VirtualCDCtl/BadSectorDatabase.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | class BadSectorDatabase 6 | { 7 | public: 8 | typedef unsigned SectorNumberType; 9 | 10 | struct Record 11 | { 12 | SectorNumberType SectorNumber; 13 | SectorNumberType SectorCount; 14 | 15 | Record(SectorNumberType number) 16 | : SectorNumber(number) 17 | , SectorCount(1) 18 | { 19 | } 20 | 21 | SectorNumberType GetFirstFollowingSector() 22 | { 23 | return SectorNumber + SectorCount; 24 | } 25 | }; 26 | 27 | private: 28 | BazisLib::Mutex m_AccessMutex; 29 | std::list m_Records; 30 | 31 | public: 32 | void AddSector(SectorNumberType number) 33 | { 34 | BazisLib::MutexLocker lck(m_AccessMutex); 35 | if (!m_Records.empty()) 36 | if (number == m_Records.back().GetFirstFollowingSector()) 37 | { 38 | m_Records.back().SectorCount++; 39 | return; 40 | } 41 | m_Records.push_back(Record(number)); 42 | } 43 | 44 | SectorNumberType GetTotalCount() 45 | { 46 | BazisLib::MutexLocker lck(m_AccessMutex); 47 | SectorNumberType count = 0; 48 | for each(Record rec in m_Records) 49 | count += rec.SectorCount; 50 | return count; 51 | } 52 | 53 | bool Empty() 54 | { 55 | BazisLib::MutexLocker lck(m_AccessMutex); 56 | return m_Records.empty(); 57 | } 58 | 59 | void DetachList(__out std::list &records) 60 | { 61 | BazisLib::MutexLocker lck(m_AccessMutex); 62 | records.clear(); 63 | m_Records.swap(records); 64 | } 65 | 66 | std::list::const_iterator begin() {return m_Records.begin();} 67 | std::list::const_iterator end() {return m_Records.end();} 68 | 69 | }; -------------------------------------------------------------------------------- /VirtualCDCtl/CDSpeed.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | std::vector QueryAvailableReadSpeeds(const BazisLib::String &devicePath, bool *pbDVD); 7 | BazisLib::ActionStatus SetCDReadSpeed(const BazisLib::String &devicePath, unsigned short readSpeed); -------------------------------------------------------------------------------- /VirtualCDCtl/DriveReadingThread.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "BadSectorDatabase.h" 8 | 9 | enum {kDefaultReadBufferSize = 256 * 1024}; 10 | 11 | class BackgroundDriveReader : private BazisLib::Thread 12 | { 13 | public: 14 | class IErrorHandler 15 | { 16 | public: 17 | enum BadSectorsAction 18 | { 19 | Ignore, 20 | RereadOnce, 21 | RereadContinuous, 22 | }; 23 | 24 | virtual bool OnWriteError(BazisLib::ActionStatus status)=0; 25 | virtual BadSectorsAction OnBadSectorsFound(BadSectorDatabase *pDB)=0; 26 | }; 27 | 28 | private: 29 | BazisLib::String m_SourcePath, m_ImagePath; 30 | BazisLib::File m_File; 31 | ULONGLONG m_VolumeSize, m_BytesDone, m_BytesDoneOnLastRemainingTimeReset; 32 | BazisLib::ActionStatus m_FinalStatus; 33 | volatile bool m_bAbort; 34 | size_t m_BufferSize; 35 | 36 | volatile bool m_bPaused; 37 | BazisLib::Win32::Event m_ContinueEvent; 38 | 39 | BazisLib::ManagedPointer m_pTargetFile; 40 | BazisLib::RateCalculator m_RateCalculator, m_RemainingTimeEstimator; 41 | BazisLib::Mutex m_RemainingTimeUpdateMutex; 42 | BazisLib::Mutex m_MainMutex; 43 | IErrorHandler *m_pErrorHandler; 44 | BadSectorDatabase m_BadSectors; 45 | bool m_bCancelBadSectorReReading; 46 | 47 | volatile ULONGLONG m_QueuedBadSectors, m_ProcessedBadSectors; 48 | 49 | public: 50 | BackgroundDriveReader(const BazisLib::String &drivePath, size_t bufferSize, BazisLib::ActionStatus *pStatus); 51 | 52 | ULONGLONG GetVolumeSize() {return m_VolumeSize;} 53 | 54 | enum TOCError 55 | { 56 | teSuccess, 57 | teMultipleTracks, 58 | teNonDataTrack, 59 | teCannotReadTOC, 60 | }; 61 | 62 | BazisLib::ActionStatus CheckTOC(TOCError *pAdditionalError); 63 | 64 | virtual int ThreadBody(); 65 | BazisLib::ActionStatus DoMainReadLoop(); 66 | BazisLib::ActionStatus ReReadBadSectors(); 67 | BazisLib::ActionStatus SetTargetFile(const BazisLib::String &filePath); 68 | 69 | public: 70 | BazisLib::ActionStatus StartReading(); 71 | BazisLib::ActionStatus QueryStatus(); 72 | 73 | void AbortIfStillRunning(); 74 | BazisLib::ActionStatus GetFinalStatus() {return m_FinalStatus;} 75 | 76 | struct ProgressRecord 77 | { 78 | ULONGLONG Total, Done; 79 | ULONGLONG TotalBad, ProcessedBad; 80 | unsigned BytesPerSecond; 81 | }; 82 | 83 | ProgressRecord GetProgress(); 84 | 85 | const wchar_t *GetSourcePath(){return m_SourcePath.c_str();} 86 | const wchar_t *GetImagePath(){return m_ImagePath.c_str();} 87 | 88 | void Pause() 89 | { 90 | m_ContinueEvent.Reset(); 91 | m_bPaused = true; 92 | } 93 | 94 | void Resume() 95 | { 96 | m_bPaused = false; 97 | m_ContinueEvent.Set(); 98 | } 99 | 100 | bool IsPaused() {return m_bPaused;} 101 | 102 | void SetErrorHandler(IErrorHandler *pErrorHandler) 103 | { 104 | BazisLib::MutexLocker lck(m_MainMutex); 105 | m_pErrorHandler = pErrorHandler; 106 | } 107 | 108 | void ResetRemainingTimeCalculation(); 109 | 110 | BazisLib::TimeSpan GetEstimatedRemainingTime(bool *pAccurate); 111 | 112 | unsigned GetTotalBadSectorCount() {return m_BadSectors.GetTotalCount();} 113 | 114 | void CancelBadSectorReReading() {m_bCancelBadSectorReReading = true;} 115 | 116 | }; -------------------------------------------------------------------------------- /VirtualCDCtl/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : VirtualCDCtl Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this VirtualCDCtl library project for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your VirtualCDCtl application. 9 | 10 | 11 | VirtualCDCtl.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | 18 | ///////////////////////////////////////////////////////////////////////////// 19 | 20 | StdAfx.h, StdAfx.cpp 21 | These files are used to build a precompiled header (PCH) file 22 | named VirtualCDCtl.pch and a precompiled types file named StdAfx.obj. 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | Other notes: 26 | 27 | AppWizard uses "TODO:" comments to indicate parts of the source code you 28 | should add to or customize. 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | -------------------------------------------------------------------------------- /VirtualCDCtl/VirtualCDCtl.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /VirtualCDCtl/VirtualDriveClient.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "VirtualDriveClient.h" 3 | 4 | #define SKIP_WINCDEMU_GUID_DEFINITION 5 | #include "../BazisVirtualCDBus/DeviceControl.h" 6 | 7 | using namespace BazisLib; 8 | 9 | VirtualDriveClient::VirtualDriveClient(const BazisLib::String &drivePath, ActionStatus *pStatus) 10 | : m_Drive(drivePath, BazisLib::FileModes::OpenReadOnly.ShareAll(), pStatus) 11 | { 12 | if (!m_Drive.Valid()) 13 | return; 14 | char sz[1024]; 15 | PSTORAGE_DEVICE_DESCRIPTOR pDesc = (PSTORAGE_DEVICE_DESCRIPTOR)sz; 16 | STORAGE_PROPERTY_QUERY query; 17 | query.QueryType = PropertyStandardQuery; 18 | query.PropertyId = StorageDeviceProperty; 19 | size_t done = m_Drive.DeviceIoControl(IOCTL_STORAGE_QUERY_PROPERTY, &query, sizeof(query), sz, sizeof(sz), pStatus); 20 | if ((done < sizeof(STORAGE_DEVICE_DESCRIPTOR)) || (pDesc->BusType != 14)) 21 | { 22 | ASSIGN_STATUS(pStatus, NotSupported); 23 | m_Drive.Close(); 24 | return; 25 | } 26 | 27 | char *pProduct = sz + pDesc->ProductIdOffset; 28 | if ((pDesc->ProductIdOffset >= sizeof(sz)) || memcmp(pProduct, "WinCDEmu", 9)) 29 | { 30 | ASSIGN_STATUS(pStatus, NotSupported); 31 | m_Drive.Close(); 32 | return; 33 | } 34 | 35 | GUIDAndVersion *pGV = (GUIDAndVersion *)(pDesc + 1); 36 | if ((pDesc->RawPropertiesLength < sizeof(GUIDAndVersion)) || (pGV->Guid != GUID_WinCDEmuDrive)) 37 | { 38 | ASSIGN_STATUS(pStatus, NotSupported); 39 | m_Drive.Close(); 40 | return; 41 | } 42 | 43 | ASSIGN_STATUS(pStatus, Success); 44 | } 45 | 46 | bool VirtualDriveClient::IsAutorunSuppressionFlagged() 47 | { 48 | if (!m_Drive.Valid()) 49 | return false; 50 | char bDisabled = 0; 51 | size_t done = m_Drive.DeviceIoControl(IOCTL_VDEV_IS_AUTORUN_DISABLED, NULL, 0, &bDisabled, 1); 52 | return (done == 1) && (bDisabled == 1); 53 | } 54 | 55 | BazisLib::String VirtualDriveClient::GetNativeMountedImagePath() 56 | { 57 | unsigned size = 0; 58 | if (m_Drive.DeviceIoControl(IOCTL_VDEV_GET_IMAGE_PATH, 0, NULL, &size, sizeof(size), NULL) != sizeof(size)) 59 | return BazisLib::String(); 60 | size_t todo = size + sizeof(size); 61 | char *pBuf = new char[todo]; 62 | if (m_Drive.DeviceIoControl(IOCTL_VDEV_GET_IMAGE_PATH, 0, NULL, pBuf, (DWORD)todo, NULL) != todo) 63 | { 64 | delete pBuf; 65 | return BazisLib::String(); 66 | } 67 | wchar_t *pStr = (wchar_t *)(pBuf + sizeof(size)); 68 | if (pStr[(size / sizeof(wchar_t)) - 1]) 69 | { 70 | delete pBuf; 71 | return BazisLib::String(); 72 | } 73 | BazisLib::String fp = pStr; 74 | delete pBuf; 75 | return fp; 76 | } 77 | 78 | BazisLib::ActionStatus VirtualDriveClient::MountNewImage(const wchar_t *pwszImage, unsigned timeout) 79 | { 80 | ActionStatus status; 81 | ULONGLONG hWait = 0; 82 | m_Drive.DeviceIoControl(IOCTL_VDEV_MOUNT_IMAGE, pwszImage, pwszImage ? ((wcslen(pwszImage) + 1) * sizeof(wchar_t)) : 0, &hWait, timeout ? sizeof(hWait) : 0, &status); 83 | if (!status.Successful()) 84 | return status; 85 | 86 | if (timeout && hWait) 87 | { 88 | if (WaitForSingleObject(reinterpret_cast(hWait), timeout) != WAIT_OBJECT_0) 89 | return MAKE_STATUS(TimeoutExpired); 90 | } 91 | return status; 92 | } -------------------------------------------------------------------------------- /VirtualCDCtl/VirtualDriveClient.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class VirtualDriveClient 5 | { 6 | private: 7 | BazisLib::File m_Drive; 8 | 9 | public: 10 | VirtualDriveClient(const BazisLib::String &drivePath, BazisLib::ActionStatus *pStatus); 11 | bool IsAutorunSuppressionFlagged(); 12 | BazisLib::String GetNativeMountedImagePath(); 13 | BazisLib::ActionStatus MountNewImage(const wchar_t *pwszImage, unsigned timeout); 14 | }; -------------------------------------------------------------------------------- /VirtualCDCtl/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // VirtualCDCtl.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /VirtualCDCtl/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | #define _CRT_SECURE_NO_WARNINGS 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | 18 | // TODO: reference additional headers your program requires here 19 | -------------------------------------------------------------------------------- /VirtualCDCtl/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /VirtualDriveManager/DriverInstaller.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | bool IsDriverInstallationPending(bool *pOldVersionInstalled); 5 | BazisLib::ActionStatus InstallDriver(bool oldVersionInstalled); 6 | BazisLib::ActionStatus UninstallDriver(); 7 | BazisLib::ActionStatus StartDriverIfNeeded(); -------------------------------------------------------------------------------- /VirtualDriveManager/MainDlg.h: -------------------------------------------------------------------------------- 1 | // MainDlg.h : interface of the CMainDlg class 2 | // 3 | ///////////////////////////////////////////////////////////////////////////// 4 | 5 | #pragma once 6 | #include "../VirtualCDCtl/VirtualCDClient.h" 7 | 8 | class CMainDlg : public CDialogImpl, public CDialogResize 9 | { 10 | private: 11 | CListViewCtrl m_ListView; 12 | CImageList m_ImageList; 13 | VirtualCDClient *m_pClient; 14 | VirtualCDClient *m_pNonPortableClient; 15 | VirtualCDClient::VirtualCDList m_LastCDList; 16 | 17 | public: 18 | CMainDlg() 19 | : m_pClient(NULL) 20 | , m_pNonPortableClient(NULL) 21 | { 22 | } 23 | 24 | ~CMainDlg() 25 | { 26 | delete m_pClient; 27 | delete m_pNonPortableClient; 28 | } 29 | 30 | public: 31 | enum { IDD = IDD_MAINDLG }; 32 | 33 | BEGIN_MSG_MAP(CMainDlg) 34 | COMMAND_HANDLER(IDC_UNINSTALL, BN_CLICKED, OnBnClickedUninstall) 35 | MESSAGE_HANDLER(WM_TIMER, OnTimer) 36 | MESSAGE_HANDLER(WM_DROPFILES, OnDropFiles) 37 | COMMAND_HANDLER(IDC_MOUNTNEW, BN_CLICKED, OnBnClickedMountnew) 38 | COMMAND_HANDLER(IDC_REPLACEIMG, BN_CLICKED, OnBnClickedReplaceImage) 39 | COMMAND_HANDLER(IDC_UNMOUNT, BN_CLICKED, OnBnClickedUnmount) 40 | COMMAND_HANDLER(IDC_UNMOUNTALL, BN_CLICKED, OnBnClickedUnmountall) 41 | CHAIN_MSG_MAP(CDialogResize) 42 | NOTIFY_HANDLER(IDC_LIST1, LVN_ITEMCHANGED, OnSelChanged) 43 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 44 | COMMAND_ID_HANDLER(IDOK, OnOK) 45 | COMMAND_ID_HANDLER(IDCANCEL, OnCancel) 46 | END_MSG_MAP() 47 | 48 | BEGIN_DLGRESIZE_MAP(CMainDlg) 49 | DLGRESIZE_CONTROL(IDC_LIST1, DLSZ_SIZE_X | DLSZ_SIZE_Y) 50 | DLGRESIZE_CONTROL(IDOK, DLSZ_MOVE_X | DLSZ_MOVE_Y) 51 | DLGRESIZE_CONTROL(IDC_MOUNTNEW, DLSZ_MOVE_Y) 52 | DLGRESIZE_CONTROL(IDC_UNMOUNT, DLSZ_MOVE_Y) 53 | DLGRESIZE_CONTROL(IDC_UNMOUNTALL, DLSZ_MOVE_Y) 54 | DLGRESIZE_CONTROL(IDC_REPLACEIMG, DLSZ_MOVE_Y) 55 | DLGRESIZE_CONTROL(IDC_UNINSTALL, DLSZ_MOVE_Y) 56 | END_DLGRESIZE_MAP() 57 | 58 | bool DoUnmountAll(bool suppressErrorMessages); 59 | BazisLib::ActionStatus DoUnmount(LPCTSTR lpRoot); 60 | 61 | 62 | // Handler prototypes (uncomment arguments if needed): 63 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 64 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 65 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 66 | 67 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/); 68 | LRESULT OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 69 | LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 70 | LRESULT OnBnClickedUninstall(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 71 | LRESULT OnTimer(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/); 72 | LRESULT OnDropFiles(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/); 73 | LRESULT OnBnClickedMountnew(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 74 | LRESULT OnBnClickedUnmount(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 75 | LRESULT OnBnClickedUnmountall(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 76 | LRESULT OnBnClickedReplaceImage(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 77 | LRESULT OnSelChanged(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/); 78 | }; 79 | -------------------------------------------------------------------------------- /VirtualDriveManager/VirtualDriveManager.h: -------------------------------------------------------------------------------- 1 | // VirtualDriveManager.h 2 | -------------------------------------------------------------------------------- /VirtualDriveManager/VirtualDriveManager.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {6e072dba-0ba5-4351-9a41-ee9382915b6e} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm 7 | 8 | 9 | {0ed8d1d4-2b1e-4c33-9646-e115bf03e96c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {834fe4db-d65d-4ba4-a4d5-10b538f59614} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | 49 | 50 | Resource Files 51 | 52 | 53 | 54 | 55 | Resource Files 56 | 57 | 58 | 59 | 60 | Resource Files 61 | 62 | 63 | -------------------------------------------------------------------------------- /VirtualDriveManager/res/VirtualDriveManager.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/VirtualDriveManager/res/VirtualDriveManager.ico -------------------------------------------------------------------------------- /VirtualDriveManager/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by VirtualDriveManager.rc 4 | // 5 | #define IDC_UNINSTALL 3 6 | #define IDC_MOUNTNEW 4 7 | #define IDC_UNMOUNT 5 8 | #define IDC_UNMOUNT2 6 9 | #define IDC_UNMOUNTALL 6 10 | #define IDC_REPLACEIMG 7 11 | #define IDR_MAINFRAME 128 12 | #define IDD_MAINDLG 129 13 | #define IDI_MAINFRAMEIDR_MAINFRAME 204 14 | #define IDC_LIST1 1000 15 | 16 | // Next default values for new objects 17 | // 18 | #ifdef APSTUDIO_INVOKED 19 | #ifndef APSTUDIO_READONLY_SYMBOLS 20 | #define _APS_NEXT_RESOURCE_VALUE 205 21 | #define _APS_NEXT_COMMAND_VALUE 32775 22 | #define _APS_NEXT_CONTROL_VALUE 1001 23 | #define _APS_NEXT_SYMED_VALUE 101 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /VirtualDriveManager/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // VirtualDriveManager.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | #if (_ATL_VER < 0x0700) 8 | #include 9 | #endif //(_ATL_VER < 0x0700) 10 | -------------------------------------------------------------------------------- /VirtualDriveManager/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | // Change these values to use different versions 9 | #define WINVER 0x0500 10 | #define _WIN32_WINNT 0x0501 11 | #define _WIN32_IE 0x0501 12 | #define _RICHEDIT_VER 0x0200 13 | 14 | #include 15 | #include 16 | 17 | extern CAppModule _Module; 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #if defined _M_IX86 26 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 27 | #elif defined _M_IA64 28 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 29 | #elif defined _M_X64 30 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 31 | #else 32 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 33 | #endif 34 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/ContextMenuBase.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "ContextMenuBase.h" 3 | #include "DebugLog.h" 4 | 5 | HRESULT STDMETHODCALLTYPE ContextMenuBase::Initialize( /* [unique][in] */ __in_opt PCIDLIST_ABSOLUTE pidlFolder, /* [unique][in] */ __in_opt IDataObject *pdtobj, /* [unique][in] */ __in_opt HKEY hkeyProgID) 6 | { 7 | WINCDEMU_LOG_LINE(L"ContextMenuBase::Initialize(): %x", pdtobj); 8 | 9 | if (!pdtobj) 10 | return E_INVALIDARG; 11 | 12 | FORMATETC fe = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; 13 | STGMEDIUM stm; 14 | HRESULT hR = pdtobj->GetData(&fe, &stm); 15 | WINCDEMU_LOG_LINE(L"pdtobj->GetData(): %x", hR); 16 | if (SUCCEEDED(hR)) 17 | { 18 | HDROP hDrop = static_cast(GlobalLock(stm.hGlobal)); 19 | WINCDEMU_LOG_LINE(L"GlobalLock(): %x", hDrop); 20 | if (hDrop == NULL) 21 | hR = E_FAIL; 22 | else 23 | { 24 | UINT nFiles = DragQueryFile(hDrop, -1, NULL, 0); 25 | WINCDEMU_LOG_LINE(L"DragQueryFile(-1): %d", nFiles); 26 | if (nFiles != 1) 27 | hR = E_INVALIDARG; 28 | else 29 | { 30 | size_t done = DragQueryFile(hDrop, 0, m_FileName.PreAllocate(MAX_PATH, false), MAX_PATH); 31 | WINCDEMU_LOG_LINE(L"DragQueryFile(0): %d, allocated=%d", done, m_FileName.GetAllocated()); 32 | 33 | if (done && done <= m_FileName.GetAllocated()) 34 | { 35 | m_FileName.SetLength(done); 36 | WINCDEMU_LOG_LINE(L"File name: %s", m_FileName.c_str()); 37 | hR = S_OK; 38 | } 39 | else 40 | hR = E_FAIL; 41 | } 42 | 43 | WINCDEMU_LOG_LINE(L"Unlocking %x...", stm.hGlobal); 44 | GlobalUnlock(stm.hGlobal); 45 | } 46 | 47 | WINCDEMU_LOG_LINE(L"Releasing medium"); 48 | ReleaseStgMedium(&stm); 49 | } 50 | 51 | return hR; 52 | } 53 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/ContextMenuBase.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class ContextMenuBase 5 | { 6 | protected: 7 | BazisLib::String m_FileName; 8 | 9 | public: 10 | HRESULT STDMETHODCALLTYPE Initialize(/* [unique][in] */ __in_opt PCIDLIST_ABSOLUTE pidlFolder, /* [unique][in] */ __in_opt IDataObject *pdtobj, /* [unique][in] */ __in_opt HKEY hkeyProgID); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/DebugLog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef ENABLE_DEBUG_LOGGING 4 | #include 5 | 6 | void LogDebugLine(BazisLib::DynamicString line); 7 | #define WINCDEMU_LOG_LINE(...) LogDebugLine(BazisLib::String::sFormat(__VA_ARGS__)) 8 | 9 | #else 10 | 11 | #define WINCDEMU_LOG_LINE(...) 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/DriveContextMenu.h: -------------------------------------------------------------------------------- 1 | // DriveContextMenu.h : Declaration of the CDriveContextMenu 2 | 3 | #pragma once 4 | #include "resource.h" // main symbols 5 | 6 | #include "WinCDEmuContextMenu_i.h" 7 | #include 8 | #include "ContextMenuBase.h" 9 | 10 | 11 | #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA) 12 | #error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms." 13 | #endif 14 | 15 | 16 | 17 | // CDriveContextMenu 18 | 19 | class ATL_NO_VTABLE CDriveContextMenu : 20 | public CComObjectRootEx, 21 | public CComCoClass, 22 | public ContextMenuBase, 23 | public IDriveContextMenu, 24 | public IContextMenu, 25 | public IShellExtInit 26 | { 27 | private: 28 | bool m_bIsWinCDEmuDrive; 29 | bool m_bIsOpticalDrive; 30 | 31 | public: 32 | CDriveContextMenu() 33 | : m_bIsWinCDEmuDrive(false) 34 | , m_bIsOpticalDrive(false) 35 | { 36 | } 37 | 38 | DECLARE_REGISTRY_RESOURCEID(IDR_DRIVECONTEXTMENU) 39 | 40 | 41 | BEGIN_COM_MAP(CDriveContextMenu) 42 | COM_INTERFACE_ENTRY(IDriveContextMenu) 43 | COM_INTERFACE_ENTRY(IContextMenu) 44 | COM_INTERFACE_ENTRY(IShellExtInit) 45 | END_COM_MAP() 46 | 47 | 48 | 49 | DECLARE_PROTECT_FINAL_CONSTRUCT() 50 | 51 | HRESULT FinalConstruct() 52 | { 53 | return S_OK; 54 | } 55 | 56 | void FinalRelease() 57 | { 58 | } 59 | 60 | public: 61 | virtual HRESULT STDMETHODCALLTYPE Initialize( 62 | /* [unique][in] */ 63 | __in_opt PCIDLIST_ABSOLUTE pidlFolder, 64 | /* [unique][in] */ 65 | __in_opt IDataObject *pdtobj, 66 | /* [unique][in] */ 67 | __in_opt HKEY hkeyProgID); 68 | 69 | virtual HRESULT STDMETHODCALLTYPE QueryContextMenu( 70 | /* [in] */ 71 | __in HMENU hmenu, 72 | /* [in] */ 73 | __in UINT indexMenu, 74 | /* [in] */ 75 | __in UINT idCmdFirst, 76 | /* [in] */ 77 | __in UINT idCmdLast, 78 | /* [in] */ 79 | __in UINT uFlags); 80 | 81 | virtual HRESULT STDMETHODCALLTYPE InvokeCommand( 82 | /* [in] */ 83 | __in CMINVOKECOMMANDINFO *pici); 84 | 85 | virtual HRESULT STDMETHODCALLTYPE GetCommandString( 86 | /* [in] */ 87 | __in UINT_PTR idCmd, 88 | /* [in] */ 89 | __in UINT uType, 90 | /* [in] */ 91 | __reserved UINT *pReserved, 92 | /* [out] */ 93 | __out_awcount(!(uType & GCS_UNICODE), cchMax) LPSTR pszName, 94 | /* [in] */ 95 | __in UINT cchMax); 96 | }; 97 | 98 | OBJECT_ENTRY_AUTO(__uuidof(DriveContextMenu), CDriveContextMenu) 99 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/DriveContextMenu.rgs: -------------------------------------------------------------------------------- 1 | HKCR 2 | { 3 | WinCDEmuContextMenu.DriveContextMenu.1 = s 'DriveContextMenu Class' 4 | { 5 | CLSID = s '{A9901FCD-B4DF-43A1-BD5D-6C9F88679497}' 6 | } 7 | WinCDEmuContextMenu.DriveContextMenu = s 'DriveContextMenu Class' 8 | { 9 | CLSID = s '{A9901FCD-B4DF-43A1-BD5D-6C9F88679497}' 10 | CurVer = s 'WinCDEmuContextMenu.DriveContextMenu.1' 11 | } 12 | NoRemove CLSID 13 | { 14 | ForceRemove {A9901FCD-B4DF-43A1-BD5D-6C9F88679497} = s 'DriveContextMenu Class' 15 | { 16 | ProgID = s 'WinCDEmuContextMenu.DriveContextMenu.1' 17 | VersionIndependentProgID = s 'WinCDEmuContextMenu.DriveContextMenu' 18 | ForceRemove 'Programmable' 19 | InprocServer32 = s '%MODULE%' 20 | { 21 | val ThreadingModel = s 'Apartment' 22 | } 23 | 'TypeLib' = s '{B77FD653-B196-4B0A-B197-7F8F704E0092}' 24 | } 25 | } 26 | 27 | NoRemove Drive 28 | { 29 | NoRemove shellex 30 | { 31 | NoRemove ContextMenuHandlers 32 | { 33 | WinCDEmu = s '{A9901FCD-B4DF-43A1-BD5D-6C9F88679497}' 34 | } 35 | } 36 | } 37 | 38 | NoRemove Folder 39 | { 40 | NoRemove shellex 41 | { 42 | NoRemove ContextMenuHandlers 43 | { 44 | WinCDEmu = s '{A9901FCD-B4DF-43A1-BD5D-6C9F88679497}' 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | ACTIVE TEMPLATE LIBRARY : WinCDEmuContextMenu Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this WinCDEmuContextMenu project for you to use as the starting point for 6 | writing your Dynamic Link Library (DLL). 7 | 8 | This file contains a summary of what you will find in each of the files that 9 | make up your project. 10 | 11 | WinCDEmuContextMenu.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | WinCDEmuContextMenu.idl 18 | This file contains the IDL definitions of the type library, the interfaces 19 | and co-classes defined in your project. 20 | This file will be processed by the MIDL compiler to generate: 21 | C++ interface definitions and GUID declarations (WinCDEmuContextMenu.h) 22 | GUID definitions (WinCDEmuContextMenu_i.c) 23 | A type library (WinCDEmuContextMenu.tlb) 24 | Marshaling code (WinCDEmuContextMenu_p.c and dlldata.c) 25 | 26 | WinCDEmuContextMenu.h 27 | This file contains the C++ interface definitions and GUID declarations of the 28 | items defined in WinCDEmuContextMenu.idl. It will be regenerated by MIDL during compilation. 29 | 30 | WinCDEmuContextMenu.cpp 31 | This file contains the object map and the implementation of your DLL's exports. 32 | 33 | WinCDEmuContextMenu.rc 34 | This is a listing of all of the Microsoft Windows resources that the 35 | program uses. 36 | 37 | WinCDEmuContextMenu.def 38 | This module-definition file provides the linker with information about the exports 39 | required by your DLL. It contains exports for: 40 | DllGetClassObject 41 | DllCanUnloadNow 42 | DllRegisterServer 43 | DllUnregisterServer 44 | 45 | ///////////////////////////////////////////////////////////////////////////// 46 | Other standard files: 47 | 48 | StdAfx.h, StdAfx.cpp 49 | These files are used to build a precompiled header (PCH) file 50 | named WinCDEmuContextMenu.pch and a precompiled types file named StdAfx.obj. 51 | 52 | Resource.h 53 | This is the standard header file that defines resource IDs. 54 | 55 | 56 | ///////////////////////////////////////////////////////////////////////////// 57 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/TransparentMenuBitmap.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include // WIC 4 | HRESULT AddIconToMenuItem(__in IWICImagingFactory *pFactory, HMENU hmenu, int iMenuItem, BOOL fByPosition, HICON hicon, BOOL fAutoDestroy, __out_opt HBITMAP *phbmp); 5 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/VCDImgContextMenu.h: -------------------------------------------------------------------------------- 1 | // VCDImgContextMenu.h : Declaration of the CVCDImgContextMenu 2 | 3 | #pragma once 4 | #include "resource.h" // main symbols 5 | 6 | #include "WinCDEmuContextMenu_i.h" 7 | #include 8 | #include "ContextMenuBase.h" 9 | 10 | 11 | #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA) 12 | #error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms." 13 | #endif 14 | 15 | 16 | 17 | // CVCDImgContextMenu 18 | 19 | class ATL_NO_VTABLE CVCDImgContextMenu : 20 | public CComObjectRootEx, 21 | public CComCoClass, 22 | public ContextMenuBase, 23 | 24 | public IContextMenu, 25 | public IShellExtInit 26 | { 27 | 28 | public: 29 | CVCDImgContextMenu() 30 | { 31 | } 32 | 33 | DECLARE_REGISTRY_RESOURCEID(IDR_VCDIMGCONTEXTMENU) 34 | 35 | DECLARE_NOT_AGGREGATABLE(CVCDImgContextMenu) 36 | 37 | BEGIN_COM_MAP(CVCDImgContextMenu) 38 | COM_INTERFACE_ENTRY(IContextMenu) 39 | COM_INTERFACE_ENTRY(IShellExtInit) 40 | END_COM_MAP() 41 | 42 | 43 | 44 | DECLARE_PROTECT_FINAL_CONSTRUCT() 45 | 46 | HRESULT FinalConstruct() 47 | { 48 | return S_OK; 49 | } 50 | 51 | void FinalRelease() 52 | { 53 | } 54 | 55 | public: 56 | virtual HRESULT STDMETHODCALLTYPE Initialize( 57 | /* [unique][in] */ 58 | __in_opt PCIDLIST_ABSOLUTE pidlFolder, 59 | /* [unique][in] */ 60 | __in_opt IDataObject *pdtobj, 61 | /* [unique][in] */ 62 | __in_opt HKEY hkeyProgID); 63 | 64 | virtual HRESULT STDMETHODCALLTYPE QueryContextMenu( 65 | /* [in] */ 66 | __in HMENU hmenu, 67 | /* [in] */ 68 | __in UINT indexMenu, 69 | /* [in] */ 70 | __in UINT idCmdFirst, 71 | /* [in] */ 72 | __in UINT idCmdLast, 73 | /* [in] */ 74 | __in UINT uFlags); 75 | 76 | virtual HRESULT STDMETHODCALLTYPE InvokeCommand( 77 | /* [in] */ 78 | __in CMINVOKECOMMANDINFO *pici); 79 | 80 | virtual HRESULT STDMETHODCALLTYPE GetCommandString( 81 | /* [in] */ 82 | __in UINT_PTR idCmd, 83 | /* [in] */ 84 | __in UINT uType, 85 | /* [in] */ 86 | __reserved UINT *pReserved, 87 | /* [out] */ 88 | __out_awcount(!(uType & GCS_UNICODE), cchMax) LPSTR pszName, 89 | /* [in] */ 90 | __in UINT cchMax); 91 | 92 | }; 93 | 94 | OBJECT_ENTRY_AUTO(__uuidof(VCDImgContextMenu), CVCDImgContextMenu) 95 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/VCDImgContextMenu.rgs: -------------------------------------------------------------------------------- 1 | HKCR 2 | { 3 | WinCDEmuContextMenu.VCDImgContextMenu.1 = s 'VCDImgContextMenu Class' 4 | { 5 | CLSID = s '{D0E37FD2-F675-426F-B09A-2CF37BA46FD5}' 6 | } 7 | WinCDEmuContextMenu.VCDImgContextMenu = s 'VCDImgContextMenu Class' 8 | { 9 | CLSID = s '{D0E37FD2-F675-426F-B09A-2CF37BA46FD5}' 10 | CurVer = s 'WinCDEmuContextMenu.VCDImgContextMenu.1' 11 | } 12 | NoRemove CLSID 13 | { 14 | ForceRemove {D0E37FD2-F675-426F-B09A-2CF37BA46FD5} = s 'VCDImgContextMenu Class' 15 | { 16 | ProgID = s 'WinCDEmuContextMenu.VCDImgContextMenu.1' 17 | VersionIndependentProgID = s 'WinCDEmuContextMenu.VCDImgContextMenu' 18 | InprocServer32 = s '%MODULE%' 19 | { 20 | val ThreadingModel = s 'Apartment' 21 | } 22 | 'TypeLib' = s '{B77FD653-B196-4B0A-B197-7F8F704E0092}' 23 | } 24 | } 25 | 26 | NoRemove * 27 | { 28 | NoRemove shellex 29 | { 30 | NoRemove ContextMenuHandlers 31 | { 32 | WinCDEmu = s '{D0E37FD2-F675-426F-B09A-2CF37BA46FD5}' 33 | } 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/WinCDEmuContextMenu.cpp: -------------------------------------------------------------------------------- 1 | // WinCDEmuContextMenu.cpp : Implementation of DLL Exports. 2 | 3 | 4 | #include "stdafx.h" 5 | #include "resource.h" 6 | #include "WinCDEmuContextMenu_i.h" 7 | #include "dllmain.h" 8 | #include "dlldatax.h" 9 | 10 | // Used to determine whether the DLL can be unloaded by OLE 11 | STDAPI DllCanUnloadNow(void) 12 | { 13 | return S_FALSE; //We've seen some Explorer crash reports caused by exceptions in unloaded context menu DLL. Not 100% sure about the cause, but preventing the unload completely should prevent those. 14 | 15 | #ifdef _MERGE_PROXYSTUB 16 | HRESULT hr = PrxDllCanUnloadNow(); 17 | if (hr != S_OK) 18 | return hr; 19 | #endif 20 | return _AtlModule.DllCanUnloadNow(); 21 | } 22 | 23 | 24 | // Returns a class factory to create an object of the requested type 25 | STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) 26 | { 27 | #ifdef _MERGE_PROXYSTUB 28 | if (PrxDllGetClassObject(rclsid, riid, ppv) == S_OK) 29 | return S_OK; 30 | #endif 31 | return _AtlModule.DllGetClassObject(rclsid, riid, ppv); 32 | } 33 | 34 | 35 | // DllRegisterServer - Adds entries to the system registry 36 | STDAPI DllRegisterServer(void) 37 | { 38 | // registers object, typelib and all interfaces in typelib 39 | HRESULT hr = _AtlModule.DllRegisterServer(); 40 | #ifdef _MERGE_PROXYSTUB 41 | if (FAILED(hr)) 42 | return hr; 43 | hr = PrxDllRegisterServer(); 44 | #endif 45 | return hr; 46 | } 47 | 48 | 49 | // DllUnregisterServer - Removes entries from the system registry 50 | STDAPI DllUnregisterServer(void) 51 | { 52 | HRESULT hr = _AtlModule.DllUnregisterServer(); 53 | #ifdef _MERGE_PROXYSTUB 54 | if (FAILED(hr)) 55 | return hr; 56 | hr = PrxDllRegisterServer(); 57 | if (FAILED(hr)) 58 | return hr; 59 | hr = PrxDllUnregisterServer(); 60 | #endif 61 | return hr; 62 | } 63 | 64 | // DllInstall - Adds/Removes entries to the system registry per user 65 | // per machine. 66 | STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine) 67 | { 68 | HRESULT hr = E_FAIL; 69 | static const wchar_t szUserSwitch[] = _T("user"); 70 | 71 | if (pszCmdLine != NULL) 72 | { 73 | if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0) 74 | { 75 | AtlSetPerUserRegistration(true); 76 | } 77 | } 78 | 79 | if (bInstall) 80 | { 81 | hr = DllRegisterServer(); 82 | if (FAILED(hr)) 83 | { 84 | DllUnregisterServer(); 85 | } 86 | } 87 | else 88 | { 89 | hr = DllUnregisterServer(); 90 | } 91 | 92 | return hr; 93 | } 94 | 95 | 96 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/WinCDEmuContextMenu.def: -------------------------------------------------------------------------------- 1 | ; WinCDEmuContextMenu.def : Declares the module parameters. 2 | 3 | LIBRARY "WinCDEmuContextMenu.DLL" 4 | 5 | EXPORTS 6 | DllCanUnloadNow PRIVATE 7 | DllGetClassObject PRIVATE 8 | DllRegisterServer PRIVATE 9 | DllUnregisterServer PRIVATE 10 | DllInstall PRIVATE 11 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/WinCDEmuContextMenu.idl: -------------------------------------------------------------------------------- 1 | // WinCDEmuContextMenu.idl : IDL source for WinCDEmuContextMenu 2 | // 3 | 4 | // This file will be processed by the MIDL tool to 5 | // produce the type library (WinCDEmuContextMenu.tlb) and marshalling code. 6 | 7 | import "oaidl.idl"; 8 | import "ocidl.idl"; 9 | import "shobjidl.idl"; 10 | 11 | [ 12 | object, 13 | uuid(918988CF-2AFC-404C-90F2-5443D7A319E7), 14 | helpstring("IVCDImgContextMenu Interface"), 15 | pointer_default(unique) 16 | ] 17 | interface IVCDImgContextMenu : IUnknown{ 18 | }; 19 | [ 20 | object, 21 | uuid(E0333ECC-5824-4AD9-8365-CCDD20184674), 22 | dual, 23 | nonextensible, 24 | helpstring("IDriveContextMenu Interface"), 25 | pointer_default(unique) 26 | ] 27 | interface IDriveContextMenu : IUnknown{ 28 | }; 29 | [ 30 | uuid(B77FD653-B196-4B0A-B197-7F8F704E0092), 31 | version(1.0), 32 | helpstring("WinCDEmuContextMenu 1.0 Type Library") 33 | ] 34 | library WinCDEmuContextMenuLib 35 | { 36 | importlib("stdole2.tlb"); 37 | [ 38 | uuid(D0E37FD2-F675-426F-B09A-2CF37BA46FD5), 39 | helpstring("VCDImgContextMenu Class") 40 | ] 41 | coclass VCDImgContextMenu 42 | { 43 | [default] interface IVCDImgContextMenu; 44 | interface IContextMenu; 45 | interface IShellExtInit; 46 | }; 47 | [ 48 | uuid(A9901FCD-B4DF-43A1-BD5D-6C9F88679497), 49 | helpstring("DriveContextMenu Class") 50 | ] 51 | coclass DriveContextMenu 52 | { 53 | [default] interface IDriveContextMenu; 54 | interface IContextMenu; 55 | interface IShellExtInit; 56 | }; 57 | }; 58 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/WinCDEmuContextMenu.rgs: -------------------------------------------------------------------------------- 1 | HKCR 2 | { 3 | NoRemove AppID 4 | { 5 | '%APPID%' = s 'WinCDEmuContextMenu' 6 | 'WinCDEmuContextMenu.DLL' 7 | { 8 | val AppID = s '%APPID%' 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/WinCDEmuContextMenu_p.c: -------------------------------------------------------------------------------- 1 | #ifdef _M_AMD64 2 | #include "WinCDEmuContextMenu_p64.c" 3 | #else 4 | #include "WinCDEmuContextMenu_p32.c" 5 | #endif -------------------------------------------------------------------------------- /WinCDEmuContextMenu/dlldata.c: -------------------------------------------------------------------------------- 1 | /********************************************************* 2 | DllData file -- generated by MIDL compiler 3 | 4 | DO NOT ALTER THIS FILE 5 | 6 | This file is regenerated by MIDL on every IDL file compile. 7 | 8 | To completely reconstruct this file, delete it and rerun MIDL 9 | on all the IDL files in this DLL, specifying this file for the 10 | /dlldata command line option 11 | 12 | *********************************************************/ 13 | 14 | 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | EXTERN_PROXY_FILE( WinCDEmuContextMenu ) 22 | 23 | 24 | PROXYFILE_LIST_START 25 | /* Start of list */ 26 | REFERENCE_PROXY_FILE( WinCDEmuContextMenu ), 27 | /* End of list */ 28 | PROXYFILE_LIST_END 29 | 30 | 31 | DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) 32 | 33 | #ifdef __cplusplus 34 | } /*extern "C" */ 35 | #endif 36 | 37 | /* end of generated dlldata file */ 38 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/dlldatax.c: -------------------------------------------------------------------------------- 1 | // wrapper for dlldata.c 2 | 3 | #ifdef _MERGE_PROXYSTUB // merge proxy stub DLL 4 | 5 | #define REGISTER_PROXY_DLL //DllRegisterServer, etc. 6 | 7 | #define _WIN32_WINNT 0x0500 //for WinNT 4.0 or Win95 with DCOM 8 | #define USE_STUBLESS_PROXY //defined only with MIDL switch /Oicf 9 | 10 | #pragma comment(lib, "rpcns4.lib") 11 | #pragma comment(lib, "rpcrt4.lib") 12 | 13 | #define ENTRY_PREFIX Prx 14 | 15 | #include "dlldata.c" 16 | #include "WinCDEmuContextMenu_p.c" 17 | 18 | #endif //_MERGE_PROXYSTUB 19 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/dlldatax.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _MERGE_PROXYSTUB 4 | 5 | extern "C" 6 | { 7 | BOOL WINAPI PrxDllMain(HINSTANCE hInstance, DWORD dwReason, 8 | LPVOID lpReserved); 9 | STDAPI PrxDllCanUnloadNow(void); 10 | STDAPI PrxDllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv); 11 | STDAPI PrxDllRegisterServer(void); 12 | STDAPI PrxDllUnregisterServer(void); 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Implementation of DllMain. 2 | 3 | #include "stdafx.h" 4 | #include "resource.h" 5 | #include "WinCDEmuContextMenu_i.h" 6 | #include "dllmain.h" 7 | #include "dlldatax.h" 8 | 9 | #include 10 | #include "../vmnt/RegistryParams.h" 11 | #include "DebugLog.h" 12 | 13 | CWinCDEmuContextMenuModule _AtlModule; 14 | HINSTANCE g_hModule; 15 | 16 | #ifdef ENABLE_DEBUG_LOGGING 17 | #include 18 | 19 | static BazisLib::Mutex s_LogMutex; 20 | static BazisLib::File *s_pLogFile; 21 | 22 | 23 | void LogDebugLine(BazisLib::DynamicString line) 24 | { 25 | BazisLib::MutexLocker lck(s_LogMutex); 26 | if (s_pLogFile) 27 | { 28 | BazisLib::DateTime now = BazisLib::DateTime::Now(); 29 | line = BazisLib::String::sFormat(L"[%02d:%02d:%02d] ", now.GetHour(), now.GetMinute(), now.GetSecond()) + line; 30 | s_pLogFile->WriteLine(line); 31 | } 32 | } 33 | 34 | #endif 35 | 36 | 37 | // DLL Entry Point 38 | extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) 39 | { 40 | switch(dwReason) 41 | { 42 | case DLL_PROCESS_ATTACH: 43 | g_hModule = hInstance; 44 | #ifdef ENABLE_DEBUG_LOGGING 45 | { 46 | BazisLib::MutexLocker lck(s_LogMutex); 47 | wchar_t wszLogFile[MAX_PATH] = { 0, }; 48 | SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, wszLogFile); 49 | wcscat_s(wszLogFile, L"\\WinCDEmuLog.txt"); 50 | s_pLogFile = new BazisLib::File(wszLogFile, BazisLib::CreateOrTruncateRW); 51 | } 52 | #endif 53 | #ifdef BAZISLIB_LOCALIZATION_ENABLED 54 | { 55 | WINCDEMU_LOG_LINE(L"Loading settings..."); 56 | RegistryParams params; //Registry params structure used by VMNT 57 | params.LoadFromRegistry(); 58 | WINCDEMU_LOG_LINE(L"Initializing translation engine..."); 59 | BazisLib::InitializeLNGBasedTranslationEngine(params.Language, _T("..\\langfiles"), hInstance); 60 | } 61 | #endif 62 | break; 63 | case DLL_PROCESS_DETACH: 64 | #ifdef ENABLE_DEBUG_LOGGING 65 | { 66 | WINCDEMU_LOG_LINE(L"Unloading..."); 67 | BazisLib::MutexLocker lck(s_LogMutex); 68 | delete s_pLogFile; 69 | s_pLogFile = NULL; 70 | } 71 | #endif 72 | break; 73 | } 74 | 75 | #ifdef _MERGE_PROXYSTUB 76 | if (!PrxDllMain(hInstance, dwReason, lpReserved)) 77 | return FALSE; 78 | #endif 79 | hInstance; 80 | return _AtlModule.DllMain(dwReason, lpReserved); 81 | } 82 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/dllmain.h: -------------------------------------------------------------------------------- 1 | // dllmain.h : Declaration of module class. 2 | 3 | class CWinCDEmuContextMenuModule : public CAtlDllModuleT< CWinCDEmuContextMenuModule > 4 | { 5 | public : 6 | DECLARE_LIBID(LIBID_WinCDEmuContextMenuLib) 7 | DECLARE_REGISTRY_APPID_RESOURCEID(IDR_WINCDEMUCONTEXTMENU, "{901EB7D4-307F-41A5-BB63-3070FCD11914}") 8 | }; 9 | 10 | extern class CWinCDEmuContextMenuModule _AtlModule; 11 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by WinCDEmuContextMenu.rc 4 | // 5 | #define IDS_PROJNAME 100 6 | #define IDR_WINCDEMUCONTEXTMENU 101 7 | #define IDR_VCDIMGCONTEXTMENU 102 8 | #define IDR_DRIVECONTEXTMENU 103 9 | #define IDI_ICON1 201 10 | #define IDI_MAINICON 201 11 | 12 | // Next default values for new objects 13 | // 14 | #ifdef APSTUDIO_INVOKED 15 | #ifndef APSTUDIO_READONLY_SYMBOLS 16 | #define _APS_NEXT_RESOURCE_VALUE 202 17 | #define _APS_NEXT_COMMAND_VALUE 32768 18 | #define _APS_NEXT_CONTROL_VALUE 201 19 | #define _APS_NEXT_SYMED_VALUE 104 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // WinCDEmuContextMenu.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, 3 | // but are changed infrequently 4 | 5 | #pragma once 6 | 7 | #ifndef STRICT 8 | #define STRICT 9 | #endif 10 | 11 | #include "targetver.h" 12 | 13 | #define _ATL_APARTMENT_THREADED 14 | #define _ATL_NO_AUTOMATIC_NAMESPACE 15 | 16 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit 17 | 18 | #include "resource.h" 19 | #include 20 | #include 21 | #include 22 | 23 | #ifdef _WIN64 24 | #define VMNT_EXE_W _T("vmnt64.exe") 25 | #else 26 | #define VMNT_EXE_W _T("vmnt.exe") 27 | #endif 28 | 29 | using namespace ATL; 30 | -------------------------------------------------------------------------------- /WinCDEmuContextMenu/targetver.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | // The following macros define the minimum required platform. The minimum required platform 5 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 6 | // your application. The macros work by enabling all features available on platform versions up to and 7 | // including the version specified. 8 | 9 | // Modify the following defines if you have to target a platform prior to the ones specified below. 10 | // Refer to MSDN for the latest info on corresponding values for different platforms. 11 | #ifndef WINVER // Specifies that the minimum required platform is Windows Vista. 12 | #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. 13 | #endif 14 | 15 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 16 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 17 | #endif 18 | 19 | #ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. 20 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. 21 | #endif 22 | 23 | #ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. 24 | #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /_distr/VirtualCD.xit: -------------------------------------------------------------------------------- 1 | ;Predefined directory prefixes are $PROGRAMFILES$, $WINDIR$, 2 | ;$SYSDIR$, $WINDRIVE$, $CURDIR$, $TEMPDIR$ 3 | 4 | $general 5 | Readme readme.txt 6 | 7 | Defaultdir $PROGRAMFILES$\WinCDEmu 8 | Options SelectDir 9 | Components main,drivers 10 | RootComps main,drivers 11 | Version 4.1 12 | UID {420D7C52-B473-481b-9E20-2DB4BF9A7E80} 13 | Name "WinCDEmu" 14 | CustomUninstallCmd $DESTDIR$\uninstall$64_OR_VOID$.exe 15 | 16 | $main 17 | file main.xic 18 | options default 19 | ;requires none 20 | 21 | $drivers 22 | file drivers.xic 23 | options default 24 | ;requires none 25 | -------------------------------------------------------------------------------- /_distr/drivers.xic: -------------------------------------------------------------------------------- 1 | $general 2 | caption "Drivers" 3 | desc readme.txt 4 | archive drivers.bzz 5 | compression lzma23 6 | 7 | source drivers 8 | 9 | ;If not defined, every file path in archive must begin with valid standard directory prefix 10 | forcedir $DESTDIR$\ 11 | 12 | version 3.00 13 | options over 14 | 15 | 16 | $registry 17 | 18 | $startmenu 19 | 20 | $postinstall 21 | instroot root\BazisVirtualCDBus $DESTDIR$\BazisVirtualCDBus.inf 22 | 23 | ;$uninstall 24 | ;uninstroot root\BazisVirtualCDBus -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_Bengali.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_Bengali.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_Catalan.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_Catalan.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_Czech.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_Czech.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_Farsi.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_Farsi.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_Slovak.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_Slovak.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_Taiwan.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_Taiwan.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_armenian.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_armenian.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_dansk.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_dansk.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_dutch.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_dutch.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_english.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_english.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_estonian.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_estonian.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_finnish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_finnish.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_french.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_french.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_german.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_german.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_greek.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_greek.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_hebrew.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_hebrew.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_hungarian.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_hungarian.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_italian.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_italian.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_japanese.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_japanese.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_kannada.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_kannada.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_korean.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_korean.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_kurdish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_kurdish.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_lithuanian.lng: -------------------------------------------------------------------------------- 1 | ; Generated by online LNG editor, http://wincdemu.sysprogs.org/translations/lngedit.php 2 | ; Syntax: <ID> <spaces or tabs> <value> 3 | ; <value> should be in C/C++ format (\r, \n, \t, \", etc.) 4 | ; Strings starting with '; ' will be ignored 5 | ; WARNING! This file should always be UNICODE! 6 | 7 | [settings] 8 | Language Lithuanian 9 | LanguageEng Lithuanian 10 | Translator Dovydas Saudys 11 | E-Mail dovydashas#gmail.com 12 | LANGID 1063 13 | CountryCode lt 14 | 15 | [strings] 16 | IDS_AUTOLETTERS Tvarkyti diskus automatiakai 17 | IDS_BADIMGFN Klaingas failo pavadinimas! 18 | IDS_CANCEL Ataaukti 19 | IDS_CHOOSELETTER Pasirinkite disko raid aiam diskui: 20 | IDS_ELLIPSIS ... 21 | IDS_LANGUAGE Kalba: 22 | IDS_LTRPOLICY Disko raid~is politika 23 | IDS_LTR_ALWAYSASK Vistada klausti priea u~dedant disk 24 | IDS_LTR_AUTO Leisti Windows valdyti disks raides automatiakai 25 | IDS_LTR_STARTINGFROM Pageidautinos sisko raids pradedant nuo 26 | IDS_MOUNTIMAGE U~dti CD/DVD disk 27 | IDS_NOAUTORUN Iajungti automatin/ diekss paleidim 28 | IDS_NOAUTORUNDEFAULT Iajungti automatin/ paleidim u~dtiems diskams 29 | IDS_NOBUS Negalima susisiekti su BazisVirtualCD.sys! 30 | IDS_NOFREELETTERS Nra laisvos vietos! 31 | IDS_OK Gerai 32 | IDS_SETTINGSHDR WinCDEmu nustatymai vert dovydas 33 | -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_norsk.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_norsk.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_norwegian.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_norwegian.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_polish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_polish.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_portuguese.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_portuguese.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_portuguese_brazil.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_portuguese_brazil.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_romanian.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_romanian.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_spanish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_spanish.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_swedish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_swedish.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_ta.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_ta.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_turkish.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_turkish.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_urdu.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_urdu.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_zh_CN.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_zh_CN.lng -------------------------------------------------------------------------------- /_distr/langfiles/vmnt_zh_TW.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/_distr/langfiles/vmnt_zh_TW.lng -------------------------------------------------------------------------------- /_distr/main.xic: -------------------------------------------------------------------------------- 1 | $general 2 | caption "Mounter application" 3 | desc readme.txt 4 | archive main.bzz 5 | compression lzma23 6 | 7 | source app 8 | 9 | ;If not defined, every file path in archive must begin with valid standard directory prefix 10 | forcedir $DESTDIR$\ 11 | 12 | version 3.50 13 | options over,forceover 14 | 15 | 16 | $registry 17 | createkeyb HKCR\Applications\vmnt$64_OR_VOID$.exe\shell\open\command 3264 18 | setstrdef "\"$DESTDIR$\vmnt$64_OR_VOID$.exe\" \"%1\"" 19 | 20 | assoc_ext iso/BazisVirtualCD.Iso "ISO CD/DVD image" %SystemRoot%\System32\shell32.dll,11 "\"$DESTDIR$\vmnt$64_OR_VOID$.exe\" \"%1\"" 21 | assoc_app iso vmnt$64_OR_VOID$.exe 22 | 23 | assoc_ext cue/BazisVirtualCD.Cue "CUE Sheet for CD/DVD image" %SystemRoot%\System32\shell32.dll,11 "\"$DESTDIR$\vmnt$64_OR_VOID$.exe\" \"%1\"" 24 | assoc_app cue vmnt$64_OR_VOID$.exe 25 | 26 | assoc_ext img/BazisVirtualCD.Img "Raw CD/DVD image" %SystemRoot%\System32\shell32.dll,11 "\"$DESTDIR$\vmnt$64_OR_VOID$.exe\" \"%1\"" 27 | assoc_app img vmnt$64_OR_VOID$.exe 28 | 29 | assoc_ext nrg/BazisVirtualCD.Nrg "Nero CD/DVD image" %SystemRoot%\System32\shell32.dll,11 "\"$DESTDIR$\vmnt$64_OR_VOID$.exe\" \"%1\"" 30 | assoc_app nrg vmnt$64_OR_VOID$.exe 31 | 32 | assoc_ext mds/BazisVirtualCD.Mds "Alcohol CD/DVD image" %SystemRoot%\System32\shell32.dll,11 "\"$DESTDIR$\vmnt$64_OR_VOID$.exe\" \"%1\"" 33 | assoc_app mds vmnt$64_OR_VOID$.exe 34 | 35 | assoc_ext ccd/BazisVirtualCD.Ccd "CloneCD CD/DVD image" %SystemRoot%\System32\shell32.dll,11 "\"$DESTDIR$\vmnt$64_OR_VOID$.exe\" \"%1\"" 36 | assoc_app ccd vmnt$64_OR_VOID$.exe 37 | 38 | 39 | $startmenu 40 | deletegroup WinCDEmu 41 | creategroup WinCDEmu 42 | createitem "WinCDEmu Settings" "\"$DESTDIR$\vmnt$64_OR_VOID$.exe\" /settings" 43 | 44 | $postinstall 45 | exec "$DESTDIR$\uninstall$64_OR_VOID$.exe /UPDATE" 46 | 47 | ;$uninstall 48 | ;removekey HKCR\BazisVirtualCD.Iso 49 | ;removekey HKCR\BazisVirtualCD.Cue 50 | ;removekey HKCR\BazisVirtualCD.Img 51 | ;removekey HKCR\Applications\vmnt$64_OR_VOID$.exe 52 | ;removedir $DESTDIR$ 53 | -------------------------------------------------------------------------------- /_distr/make.bat: -------------------------------------------------------------------------------- 1 | REM @echo off 2 | 3 | call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" 4 | msbuild /m ..\WinCDEmu.sln /property:Platform=Win32 /property:Configuration="Release (Kernel-mode)" || goto error 5 | msbuild /m ..\WinCDEmu.sln /property:Platform=x64 /property:Configuration="Release (Kernel-mode)" || goto error 6 | msbuild /m ..\WinCDEmu.sln /property:Platform=Win32 /property:Configuration="Release (User-mode)" || goto error 7 | msbuild /m ..\WinCDEmu.sln /property:Platform=x64 /property:Configuration="Release (User-mode)" || goto error 8 | 9 | msbuild ..\InstallerStub\InstallerStub.sln /property:Platform=Win32 /property:Configuration="Release" || goto error 10 | mkdir drivers 11 | mkdir app 12 | mkdir app\langfiles 13 | xcopy /Y /S ..\AllModules\Drivers Drivers 14 | xcopy /Y /S ..\AllModules\App App 15 | xcopy /Y /S Langfiles App\Langfiles 16 | 17 | del app\*.pdb 18 | del app\x86\*.pdb 19 | del app\x64\*.pdb 20 | del app\x86\*.lib 21 | del app\x64\*.lib 22 | del app\x86\*.exp 23 | del app\x64\*.exp 24 | del drivers\x86\*.pdb 25 | del drivers\x64\*.pdb 26 | copy /y ..\redist\mkisofs.exe app\mkisofs.exe 27 | 28 | if not exist ..\AllModules\InstallerStub.exe goto error 29 | call ..\..\..\svn\utils\upx ..\AllModules\InstallerStub.exe 30 | 31 | cipher /d /a /s:. 32 | 33 | call ..\..\..\svn\utils\mkcat.bat drivers 34 | call ..\..\..\svn\utils\sign_r.bat drivers\BazisVirtualCDBus.cat 35 | 36 | call ..\..\..\svn\utils\ssibuilder VirtualCD.xit WinCDEmu-4.1.exe /linkcabs /nopause /exestub:..\AllModules\InstallerStub.exe 37 | cipher /d /a *.exe 38 | call ..\..\..\svn\utils\sign_r.bat WinCDEmu-4.1.exe 39 | goto end 40 | :error 41 | echo Build failed! 42 | pause 43 | 44 | :end 45 | pause -------------------------------------------------------------------------------- /batchmnt/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | CONSOLE APPLICATION : batchmnt Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this batchmnt application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your batchmnt application. 9 | 10 | 11 | batchmnt.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | batchmnt.cpp 18 | This is the main application source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named batchmnt.pch and a precompiled types file named StdAfx.obj. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other notes: 29 | 30 | AppWizard uses "TODO:" comments to indicate parts of the source code you 31 | should add to or customize. 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | -------------------------------------------------------------------------------- /batchmnt/batchmnt.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | #include "../wcdversion.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "afxres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // Russian resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) 20 | #ifdef _WIN32 21 | LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT 22 | #pragma code_page(1251) 23 | #endif //_WIN32 24 | 25 | #ifdef APSTUDIO_INVOKED 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // 28 | // TEXTINCLUDE 29 | // 30 | 31 | 1 TEXTINCLUDE 32 | BEGIN 33 | "resource.h\0" 34 | END 35 | 36 | 2 TEXTINCLUDE 37 | BEGIN 38 | "#include ""afxres.h""\r\n" 39 | "\0" 40 | END 41 | 42 | 3 TEXTINCLUDE 43 | BEGIN 44 | "\r\n" 45 | "\0" 46 | END 47 | 48 | #endif // APSTUDIO_INVOKED 49 | 50 | 51 | ///////////////////////////////////////////////////////////////////////////// 52 | // 53 | // Version 54 | // 55 | 56 | VS_VERSION_INFO VERSIONINFO 57 | FILEVERSION WINCDEMU_VERSION 58 | PRODUCTVERSION WINCDEMU_VERSION 59 | FILEFLAGSMASK 0x17L 60 | #ifdef _DEBUG 61 | FILEFLAGS 0x1L 62 | #else 63 | FILEFLAGS 0x0L 64 | #endif 65 | FILEOS 0x4L 66 | FILETYPE 0x1L 67 | FILESUBTYPE 0x0L 68 | BEGIN 69 | BLOCK "StringFileInfo" 70 | BEGIN 71 | BLOCK "000004b0" 72 | BEGIN 73 | VALUE "Comments", COMMENTS_STR 74 | VALUE "CompanyName", COMPANY_STR 75 | VALUE "FileDescription", "WinCDEmu batch mounter" 76 | VALUE "FileVersion", WINCDEMU_VERSION_STR 77 | VALUE "LegalCopyright", COPYRIGHT_STR 78 | VALUE "LegalTrademarks", TRADEMARKS_STR 79 | VALUE "OriginalFilename", "batchmnt.exe" 80 | VALUE "ProductName", PRODUCTNAME_STR 81 | VALUE "ProductVersion", WINCDEMU_VERSION_STR 82 | END 83 | END 84 | BLOCK "VarFileInfo" 85 | BEGIN 86 | VALUE "Translation", 0x0, 1200 87 | END 88 | END 89 | 90 | #endif // Russian resources 91 | ///////////////////////////////////////////////////////////////////////////// 92 | 93 | 94 | 95 | #ifndef APSTUDIO_INVOKED 96 | ///////////////////////////////////////////////////////////////////////////// 97 | // 98 | // Generated from the TEXTINCLUDE 3 resource. 99 | // 100 | 101 | 102 | ///////////////////////////////////////////////////////////////////////////// 103 | #endif // not APSTUDIO_INVOKED 104 | 105 | -------------------------------------------------------------------------------- /batchmnt/batchmnt.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | 40 | 41 | Resource Files 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /batchmnt/main.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | int BatchMounterMain(int argc, _TCHAR* argv [], bool portable); 4 | 5 | int _tmain(int argc, _TCHAR* argv []) 6 | { 7 | return BatchMounterMain(argc, argv, false); 8 | } -------------------------------------------------------------------------------- /batchmnt/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by batchmnt.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /batchmnt/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // batchmnt.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /batchmnt/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | 13 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 14 | #define _CRT_SECURE_NO_WARNINGS 15 | 16 | #include 17 | #include 18 | 19 | 20 | 21 | // TODO: reference additional headers your program requires here 22 | -------------------------------------------------------------------------------- /batchmnt/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | WinCDEmu Build Instructions 2 | =========================== 3 | 4 | 0. Checkout WinCDEmu (https://github.com/sysprogs/WinCDEmu), BazisLib (https://github.com/sysprogs/BazisLib) and STLPort-kernel (https://github.com/sysprogs/stlport-kernel) to a common directory. 5 | 0. Set the BZSLIB_PATH environment variable to point at the BazisLib directory 6 | 0. Set the STLPORT_PATH environment variable to point at the STLPort directory 7 | 0. Install WDK 7.x and set the WDK7PATH environment variable to point at it 8 | 0. Download/unpack WTL 8.0 and set WTL_PATH to point at it 9 | 0. Open WinCDEmu.sln in Visual Studio 2010-2015 10 | 0. Build the kernel-mode release configurations and then the user-mode release configurations 11 | 0. The binaries will be saved to AllModules -------------------------------------------------------------------------------- /redist/mkisofs.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/redist/mkisofs.exe -------------------------------------------------------------------------------- /vmnt/BadSectorDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "resource.h" 3 | #include "../VirtualCDCtl/BadSectorDatabase.h" 4 | #include "BadSectorReportDialog.h" 5 | 6 | class CBadSectorDialog : public CDialogImpl 7 | { 8 | private: 9 | BadSectorDatabase *m_pBadSectorDB; 10 | 11 | public: 12 | CBadSectorDialog(BadSectorDatabase *pDB) 13 | : m_pBadSectorDB(pDB) 14 | { 15 | } 16 | 17 | enum { IDD = IDD_BADSECTORS }; 18 | 19 | BEGIN_MSG_MAP(CLetterSelectionDialog) 20 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 21 | MESSAGE_HANDLER(WM_CLOSE, OnClose) 22 | COMMAND_HANDLER(IDC_REREADONCE, BN_CLICKED, OnBnClickedCmd) 23 | COMMAND_HANDLER(IDC_REREADLOOP, BN_CLICKED, OnBnClickedCmd) 24 | COMMAND_HANDLER(IDC_REPORTBADSECTORS, BN_CLICKED, OnBnClickedReportbadsectors) 25 | COMMAND_HANDLER(IDC_IGNOREBAD, BN_CLICKED, OnBnClickedCmd) 26 | END_MSG_MAP() 27 | 28 | public: 29 | // Handler prototypes (uncomment arguments if needed): 30 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 31 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 32 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 33 | 34 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) 35 | { 36 | SetDlgItemText(IDC_BADSECTORSREPORT, BazisLib::String::sFormat(_TR(IDS_BADSECTORACTIONFMT, "Found %d bad sectors while reading the disc. Please select an action:"), m_pBadSectorDB->GetTotalCount()).c_str()); 37 | LocalizeLabels(); 38 | return 0; 39 | } 40 | 41 | LRESULT OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) 42 | { 43 | EndDialog(IDCANCEL); 44 | return 0; 45 | } 46 | 47 | private: 48 | void LocalizeLabels() 49 | { 50 | LOCALIZE_DIALOG(IDS_BADSECTORSDLGTITLE, IDD_BADSECTORS, m_hWnd); 51 | LOCALIZE_DLGITEM(IDS_REREADONCE, IDC_REREADONCE, m_hWnd); 52 | LOCALIZE_DLGITEM(IDS_REREADLOOP, IDC_REREADLOOP, m_hWnd); 53 | LOCALIZE_DLGITEM(IDS_REPORTBADSECTORS, IDC_REPORTBADSECTORS, m_hWnd); 54 | LOCALIZE_DLGITEM(IDS_IGNOREBADSECTORS, IDC_IGNOREBAD, m_hWnd); 55 | LOCALIZE_DLGITEM(NULL, IDC_BADSECTORSREPORT, m_hWnd); 56 | } 57 | public: 58 | LRESULT OnBnClickedCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 59 | { 60 | EndDialog(wID); 61 | return 0; 62 | } 63 | 64 | 65 | LRESULT OnBnClickedReportbadsectors(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 66 | { 67 | CBadSectorReportDialog dlg(m_pBadSectorDB); 68 | dlg.DoModal(); 69 | return 0; 70 | } 71 | }; 72 | -------------------------------------------------------------------------------- /vmnt/BadSectorReportDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "resource.h" 3 | #include "../VirtualCDCtl/BadSectorDatabase.h" 4 | 5 | class CBadSectorReportDialog : public CDialogImpl 6 | { 7 | private: 8 | BadSectorDatabase *m_pBadSectorDB; 9 | 10 | public: 11 | CBadSectorReportDialog(BadSectorDatabase *pDB) 12 | : m_pBadSectorDB(pDB) 13 | { 14 | } 15 | 16 | enum { IDD = IDD_BADSECTORREPORT }; 17 | 18 | BEGIN_MSG_MAP(CLetterSelectionDialog) 19 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 20 | MESSAGE_HANDLER(WM_CLOSE, OnClose) 21 | COMMAND_HANDLER(IDOK, BN_CLICKED, OnBnClickedOK) 22 | END_MSG_MAP() 23 | 24 | public: 25 | // Handler prototypes (uncomment arguments if needed): 26 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 27 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 28 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 29 | 30 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) 31 | { 32 | LocalizeLabels(); 33 | 34 | BazisLib::String report; 35 | report.Format(_TR(IDS_BADSECTORREPORTHDR, "WinCDEmu found %d bad sectors:\r\n"), m_pBadSectorDB->GetTotalCount()); 36 | for each(BadSectorDatabase::Record rec in *m_pBadSectorDB) 37 | report += BazisLib::String::sFormat(_TR(IDS_BADSECTORREPORTLINE, "0x%08X - 0x%08X (%d sectors)\r\n"), (int)rec.SectorNumber, (int)(rec.SectorNumber + rec.SectorCount), (int)rec.SectorCount); 38 | 39 | SetDlgItemText(IDC_EDIT1, report.c_str()); 40 | return 0; 41 | } 42 | 43 | LRESULT OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) 44 | { 45 | EndDialog(IDCANCEL); 46 | return 0; 47 | } 48 | 49 | private: 50 | void LocalizeLabels() 51 | { 52 | LOCALIZE_DIALOG(IDS_BADSECTORREPORTDLGTITLE, IDD_BADSECTORREPORT, m_hWnd); 53 | LOCALIZE_DLGITEM(IDS_CLOSE, IDOK, m_hWnd); 54 | } 55 | public: 56 | LRESULT OnBnClickedOK(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 57 | { 58 | EndDialog(IDOK); 59 | return 0; 60 | } 61 | 62 | }; 63 | -------------------------------------------------------------------------------- /vmnt/ContextMenuLabels.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #ifdef BAZISLIB_LOCALIZATION_ENABLED 5 | #include "vmnt_lng.h" 6 | #endif 7 | 8 | //We define it here so that the LNG file builder will recognize the _TR statements 9 | static inline const TCHAR *txtSelectAndMount() {return _TR(IDS_SELECTANDMOUNT, "Select drive letter && mount");} 10 | static inline const TCHAR *txtCreateISO() { return _TR(IDS_CREATEISO, "Create an ISO image"); } 11 | static inline const TCHAR *txtBuildISO() { return _TR(IDS_BUILDISO, "Build an ISO image"); } 12 | static inline const TCHAR *txtSelectAnotherImage() { return _TR(IDS_MOUNTANOTHERIMAGE, "Mount another disc image"); } 13 | static inline const TCHAR *txtMountToExistingDrive() { return _TR(IDS_MOUNTTODRIVE, "Mount to an existing virtual drive"); } 14 | -------------------------------------------------------------------------------- /vmnt/ISOBuildProgressDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | 5 | #include "RegistryParams.h" 6 | #include "../VirtualCDCtl/DriveReadingThread.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "TaskBarInterface.h" 13 | 14 | //A WTL bug prevents correct display of group boxes when using CDialogResize. 15 | class CISOBuildProgressDialog : public CDialogImpl /*, public CDialogResize*/ 16 | { 17 | private: 18 | CProgressBarCtrl m_ProgressBar; 19 | CComPtr m_pTaskbar; 20 | BazisLib::String m_CommandLine, m_IsoFile, m_Folder; 21 | bool m_DetailsShown; 22 | unsigned m_ExpandedHeight; 23 | BazisLib::Win32::Process *m_pProcess; 24 | HANDLE m_hOutputPipe; 25 | BazisLib::ActionStatus m_ExecStatus; 26 | BazisLib::DynamicStringA m_AllOutput; 27 | int m_LastProgressMessageOffset; 28 | CComboBox m_cbLetters; 29 | bool m_Succeeded; 30 | 31 | RegistryParams m_RegParams; 32 | ISOCreatorRegistryParams m_ISORegParams; 33 | 34 | 35 | public: 36 | CISOBuildProgressDialog(const BazisLib::String &mkisofsCommandLine, const BazisLib::String &isoFile, const BazisLib::String &folder); 37 | 38 | ~CISOBuildProgressDialog() 39 | { 40 | delete m_pProcess; 41 | CloseHandle(m_hOutputPipe); 42 | } 43 | 44 | public: 45 | enum { IDD = IDD_ISOBUILDPROGRESS }; 46 | 47 | BEGIN_MSG_MAP(CISOBuildProgressDialog) 48 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 49 | MESSAGE_HANDLER(WM_TIMER, OnTimer) 50 | COMMAND_ID_HANDLER(IDCANCEL, OnBnClickedCancel) 51 | COMMAND_ID_HANDLER(IDC_DETAILS, OnBnClickedDetails) 52 | //CHAIN_MSG_MAP(CDialogResize) 53 | END_MSG_MAP() 54 | 55 | /* 56 | BEGIN_DLGRESIZE_MAP(CISOProgressDialog) 57 | DLGRESIZE_CONTROL(IDC_ISOFILE, DLSZ_SIZE_X) 58 | DLGRESIZE_CONTROL(IDC_FOLDER, DLSZ_SIZE_X) 59 | DLGRESIZE_CONTROL(IDC_PROGRESS1, DLSZ_SIZE_X) 60 | DLGRESIZE_CONTROL(IDC_DETAILS, DLSZ_MOVE_X) 61 | DLGRESIZE_CONTROL(IDCANCEL, DLSZ_MOVE_X) 62 | DLGRESIZE_CONTROL(IDC_PROGRESSTEXT, DLSZ_SIZE_X | DLSZ_SIZE_Y) 63 | 64 | DLGRESIZE_CONTROL(IDC_WHENDONE, DLSZ_SIZE_X) 65 | DLGRESIZE_CONTROL(IDC_MOUNTISO, DLSZ_MOVE_X) 66 | DLGRESIZE_CONTROL(IDC_DRIVELETTER, DLSZ_MOVE_X) 67 | END_DLGRESIZE_MAP()*/ 68 | 69 | public: 70 | // Handler prototypes (uncomment arguments if needed): 71 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 72 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 73 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 74 | 75 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 76 | LRESULT OnTimer(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 77 | LRESULT OnBnClickedCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 78 | LRESULT OnBnClickedDetails(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 79 | 80 | private: 81 | void SaveParams(); 82 | void LocalizeLabels(); 83 | }; 84 | -------------------------------------------------------------------------------- /vmnt/ISOProgressDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | 5 | #include "RegistryParams.h" 6 | #include "../VirtualCDCtl/DriveReadingThread.h" 7 | #include 8 | #include 9 | #include "TaskBarInterface.h" 10 | 11 | class CISOProgressDialog : public CDialogImpl, public BackgroundDriveReader::IErrorHandler 12 | { 13 | private: 14 | CComboBox m_cbLetters, m_cbReadSpeeds; 15 | CProgressBarCtrl m_ProgressBar; 16 | 17 | RegistryParams m_RegParams; 18 | ISOCreatorRegistryParams m_ISORegParams; 19 | 20 | BackgroundDriveReader *m_pReader; 21 | std::vector m_CDReadSpeeds; 22 | bool m_bBadSectorDialogInvoked; 23 | CComPtr m_pTaskbar; 24 | 25 | private: 26 | enum {WMX_RETRYCANCEL = WM_USER + 13, WMX_BADSECTORS}; 27 | 28 | public: 29 | CISOProgressDialog(BackgroundDriveReader *pReader) 30 | : m_pReader(pReader) 31 | , m_bBadSectorDialogInvoked(false) 32 | { 33 | m_pTaskbar.CoCreateInstance(CLSID_TaskbarList); 34 | } 35 | 36 | public: 37 | enum { IDD = IDD_ISOPROGRESS }; 38 | 39 | BEGIN_MSG_MAP(CISOProgressDialog) 40 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 41 | MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) 42 | MESSAGE_HANDLER(WM_CLOSE, OnClose) 43 | MESSAGE_HANDLER(WM_TIMER, OnTimer) 44 | MESSAGE_HANDLER(WMX_RETRYCANCEL, OnRetryCancel) 45 | MESSAGE_HANDLER(WMX_BADSECTORS, OnBadSectors) 46 | COMMAND_ID_HANDLER(IDCANCEL, OnBnClickedCancel) 47 | COMMAND_HANDLER(IDC_CDREADSPEED, CBN_SELCHANGE, OnCbnSelchangeCdreadspeed) 48 | COMMAND_HANDLER(IDC_PAUSE, BN_CLICKED, OnBnClickedPause) 49 | END_MSG_MAP() 50 | 51 | public: 52 | // Handler prototypes (uncomment arguments if needed): 53 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 54 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 55 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 56 | 57 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 58 | LRESULT OnShowWindow(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 59 | LRESULT OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 60 | LRESULT OnTimer(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 61 | LRESULT OnRetryCancel(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 62 | LRESULT OnBadSectors(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 63 | LRESULT OnBnClickedCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 64 | 65 | private: 66 | void LocalizeLabels(); 67 | void DisplayParams(); 68 | void SaveParams(); 69 | public: 70 | LRESULT OnCbnSelchangeCdreadspeed(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 71 | LRESULT OnBnClickedPause(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 72 | 73 | public: 74 | virtual bool OnWriteError(BazisLib::ActionStatus status); 75 | virtual BackgroundDriveReader::IErrorHandler::BadSectorsAction OnBadSectorsFound(BadSectorDatabase *pDB); 76 | }; 77 | -------------------------------------------------------------------------------- /vmnt/LetterSelectionDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | #include "RegistryParams.h" 5 | 6 | #define SKIP_WINCDEMU_GUID_DEFINITION 7 | #include "../BazisVirtualCDBus/DeviceControl.h" 8 | #include "../VirtualCDCtl/VirtualCDClient.h" 9 | 10 | class CLetterSelectionDialog : public CDialogImpl 11 | { 12 | private: 13 | CComboBox m_cbLetters, m_cbDiscTypes; 14 | char m_DriveLetter; 15 | 16 | RegistryParams m_RegParams; 17 | bool m_bForciblyInvoked; 18 | unsigned m_SelectedMMCProfile; 19 | 20 | #ifdef WINCDEMU_DEBUG_LOGGING_SUPPORT 21 | bool m_bEnableDebugLogging; 22 | #endif 23 | 24 | private: 25 | void DisplayParams(); 26 | 27 | public: 28 | CLetterSelectionDialog(bool ForciblyInvoked, unsigned detectedMMCProfile) 29 | : m_DriveLetter(0) 30 | , m_bForciblyInvoked(ForciblyInvoked) 31 | , m_SelectedMMCProfile(detectedMMCProfile) 32 | { 33 | if (m_SelectedMMCProfile == mpInvalid) 34 | m_SelectedMMCProfile = m_RegParams.DefaultMMCProfile; 35 | } 36 | 37 | public: 38 | enum { IDD = IDD_SELECTFOLDER }; 39 | 40 | BEGIN_MSG_MAP(CLetterSelectionDialog) 41 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 42 | MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) 43 | MESSAGE_HANDLER(WM_CLOSE, OnClose) 44 | COMMAND_ID_HANDLER(IDOK, OnBnClickedOk) 45 | COMMAND_ID_HANDLER(IDCANCEL, OnBnClickedCancel) 46 | COMMAND_ID_HANDLER(IDC_SETTINGS, OnBnClickedSettings) 47 | END_MSG_MAP() 48 | 49 | public: 50 | // Handler prototypes (uncomment arguments if needed): 51 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 52 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 53 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 54 | 55 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 56 | LRESULT OnShowWindow(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 57 | LRESULT OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 58 | LRESULT OnBnClickedCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 59 | LRESULT OnBnClickedOk(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 60 | LRESULT OnBnClickedSettings(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 61 | 62 | public: 63 | char GetDriveLetter() 64 | { 65 | return m_DriveLetter; 66 | } 67 | 68 | bool IsAutorunDisabled() 69 | { 70 | return m_RegParams.DisableAutorun; 71 | } 72 | 73 | bool IsPersistent() 74 | { 75 | return m_RegParams.PersistentDefault; 76 | } 77 | 78 | enum MMCProfile GetMMCProfile() 79 | { 80 | return (enum MMCProfile)m_SelectedMMCProfile; 81 | } 82 | 83 | #ifdef WINCDEMU_DEBUG_LOGGING_SUPPORT 84 | bool IsDebugLoggingEnabled() {return m_bEnableDebugLogging;} 85 | #endif 86 | 87 | private: 88 | void LocalizeLabels(); 89 | }; 90 | -------------------------------------------------------------------------------- /vmnt/RegistryParams.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | enum DriverLetterMode 6 | { 7 | drvlAutomatic, 8 | drvlStartingFromGiven, 9 | drvlAskEveryTime, 10 | }; 11 | 12 | static const LPCTSTR lpSupportedExtensions [] = { _T("iso"), _T("cue"), _T("img"), _T("nrg"), _T("mds"), _T("ccd") }; 13 | 14 | DECLARE_SERIALIZEABLE_STRUC6_I(_RegistryParamsBase, 15 | unsigned, DriveLetterPolicy, drvlAskEveryTime, 16 | unsigned, StartingDriveLetterIndex, ('V' - 'A'), 17 | bool, DisableAutorun, false, 18 | bool, PersistentDefault, false, 19 | unsigned, Language, 0, 20 | unsigned, DefaultMMCProfile, 0); 21 | 22 | DECLARE_SERIALIZEABLE_STRUC5_I(_ISOCreatorRegistryParamsBase, 23 | bool, CloseWindowAutomatically, false, 24 | bool, EjectDiscAutomatically, false, 25 | bool, MountISOAutomatically, false, 26 | bool, OpenFolderAutomatically, false, 27 | int, ReadBufferSize, 0); 28 | 29 | namespace 30 | { 31 | TCHAR tszWinCDEmuRegistryPath[] = _T("SOFTWARE\\SysProgs\\WinCDEmu"); 32 | TCHAR tszWinCDEmuISOCreatorRegistryPath[] = _T("SOFTWARE\\SysProgs\\WinCDEmu\\ISOCreator"); 33 | } 34 | 35 | template class _RegistryParametersT : public _SerializeableStructure 36 | { 37 | public: 38 | _RegistryParametersT() 39 | { 40 | if (AutoLoad) 41 | LoadFromRegistry(); 42 | } 43 | 44 | void LoadFromRegistry() 45 | { 46 | BazisLib::Win32::RegistryKey key(hRootKey, lpRegistryPath); 47 | BazisLib::Win32::RegistrySerializer::Deserialize(key, *this); 48 | } 49 | 50 | void SaveToRegistry() 51 | { 52 | BazisLib::Win32::RegistryKey key(hRootKey, lpRegistryPath); 53 | BazisLib::Win32::RegistrySerializer::Serialize(key, *this); 54 | } 55 | }; 56 | 57 | typedef _RegistryParametersT<_RegistryParamsBase, tszWinCDEmuRegistryPath, HKEY_CURRENT_USER> RegistryParams; 58 | typedef _RegistryParametersT<_ISOCreatorRegistryParamsBase, tszWinCDEmuISOCreatorRegistryPath, HKEY_CURRENT_USER> ISOCreatorRegistryParams; 59 | -------------------------------------------------------------------------------- /vmnt/SettingsDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | #include "RegistryParams.h" 5 | #include 6 | 7 | class CSettingsDialog : public CDialogImpl 8 | { 9 | private: 10 | RegistryParams m_RegParams; 11 | CComboBox m_cbLetters; 12 | CComboBox m_cbLanguages; 13 | BazisLib::RegistryKey m_DriverParametersKey; 14 | 15 | public: 16 | CSettingsDialog() 17 | : m_DriverParametersKey(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Services\\BazisVirtualCDBus\\Parameters")) 18 | { 19 | } 20 | 21 | public: 22 | enum { IDD = IDD_SETTINGS }; 23 | 24 | BEGIN_MSG_MAP(CPropertiesDlg) 25 | MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 26 | MESSAGE_HANDLER(WM_CLOSE, OnClose) 27 | COMMAND_ID_HANDLER(IDOK, OnBnClickedOk) 28 | COMMAND_ID_HANDLER(IDCANCEL, OnBnClickedCancel) 29 | COMMAND_HANDLER(IDC_LANGSELECT, CBN_SELCHANGE, OnCbnSelchangeLangselect) 30 | END_MSG_MAP() 31 | 32 | public: 33 | // Handler prototypes (uncomment arguments if needed): 34 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 35 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 36 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 37 | 38 | LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 39 | LRESULT OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled); 40 | LRESULT OnBnClickedCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 41 | LRESULT OnBnClickedOk(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 42 | 43 | private: 44 | void LocalizeLabels(); 45 | public: 46 | LRESULT OnCbnSelchangeLangselect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 47 | }; 48 | -------------------------------------------------------------------------------- /vmnt/TaskBarInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //Imported from Win7 SDK. 4 | //TODO: migrate build environment to Visual Studio 2010 5 | 6 | #ifndef __ITaskbarList3_INTERFACE_DEFINED__ 7 | #define __ITaskbarList3_INTERFACE_DEFINED__ 8 | 9 | /* interface ITaskbarList3 */ 10 | /* [object][uuid] */ 11 | 12 | typedef /* [v1_enum] */ 13 | enum TBPFLAG 14 | { TBPF_NOPROGRESS = 0, 15 | TBPF_INDETERMINATE = 0x1, 16 | TBPF_NORMAL = 0x2, 17 | TBPF_ERROR = 0x4, 18 | TBPF_PAUSED = 0x8 19 | } TBPFLAG; 20 | 21 | EXTERN_C const IID IID_ITaskbarList3; 22 | typedef struct THUMBBUTTON *LPTHUMBBUTTON; 23 | 24 | MIDL_INTERFACE("ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf") 25 | ITaskbarList3 : public ITaskbarList2 26 | { 27 | public: 28 | virtual HRESULT STDMETHODCALLTYPE SetProgressValue( 29 | /* [in] */ __RPC__in HWND hwnd, 30 | /* [in] */ ULONGLONG ullCompleted, 31 | /* [in] */ ULONGLONG ullTotal) = 0; 32 | 33 | virtual HRESULT STDMETHODCALLTYPE SetProgressState( 34 | /* [in] */ __RPC__in HWND hwnd, 35 | /* [in] */ TBPFLAG tbpFlags) = 0; 36 | 37 | virtual HRESULT STDMETHODCALLTYPE RegisterTab( 38 | /* [in] */ __RPC__in HWND hwndTab, 39 | /* [in] */ __RPC__in HWND hwndMDI) = 0; 40 | 41 | virtual HRESULT STDMETHODCALLTYPE UnregisterTab( 42 | /* [in] */ __RPC__in HWND hwndTab) = 0; 43 | 44 | virtual HRESULT STDMETHODCALLTYPE SetTabOrder( 45 | /* [in] */ __RPC__in HWND hwndTab, 46 | /* [in] */ __RPC__in HWND hwndInsertBefore) = 0; 47 | 48 | virtual HRESULT STDMETHODCALLTYPE SetTabActive( 49 | /* [in] */ __RPC__in HWND hwndTab, 50 | /* [in] */ __RPC__in HWND hwndMDI, 51 | /* [in] */ DWORD dwReserved) = 0; 52 | 53 | virtual HRESULT STDMETHODCALLTYPE ThumbBarAddButtons( 54 | /* [in] */ __RPC__in HWND hwnd, 55 | /* [in] */ UINT cButtons, 56 | /* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton) = 0; 57 | 58 | virtual HRESULT STDMETHODCALLTYPE ThumbBarUpdateButtons( 59 | /* [in] */ __RPC__in HWND hwnd, 60 | /* [in] */ UINT cButtons, 61 | /* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton) = 0; 62 | 63 | virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList( 64 | /* [in] */ __RPC__in HWND hwnd, 65 | /* [in] */ __RPC__in_opt HIMAGELIST himl) = 0; 66 | 67 | virtual HRESULT STDMETHODCALLTYPE SetOverlayIcon( 68 | /* [in] */ __RPC__in HWND hwnd, 69 | /* [in] */ __RPC__in HICON hIcon, 70 | /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszDescription) = 0; 71 | 72 | virtual HRESULT STDMETHODCALLTYPE SetThumbnailTooltip( 73 | /* [in] */ __RPC__in HWND hwnd, 74 | /* [string][unique][in] */ __RPC__in_opt_string LPCWSTR pszTip) = 0; 75 | 76 | virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip( 77 | /* [in] */ __RPC__in HWND hwnd, 78 | /* [in] */ __RPC__in RECT *prcClip) = 0; 79 | 80 | }; 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /vmnt/UACInvokerDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | #include 5 | 6 | int RunSelfElevated(LPCTSTR lpCmdLine = GetCommandLine()); 7 | 8 | class CUACInvokerDialog : public CDialogImpl 9 | { 10 | private: 11 | BazisLib::String m_CmdLine; 12 | 13 | public: 14 | CUACInvokerDialog(BazisLib::String cmdLine) 15 | : m_CmdLine(cmdLine) 16 | { 17 | } 18 | 19 | public: 20 | enum { IDD = IDD_EMPTY }; 21 | 22 | BEGIN_MSG_MAP(CUACInvokerDialog) 23 | MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) 24 | END_MSG_MAP() 25 | 26 | public: 27 | // Handler prototypes (uncomment arguments if needed): 28 | // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) 29 | // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) 30 | // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) 31 | 32 | LRESULT OnShowWindow(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled) 33 | { 34 | BringWindowToTop(); 35 | SetForegroundWindow(m_hWnd); 36 | EndDialog(RunSelfElevated(m_CmdLine.c_str())); 37 | return 0; 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /vmnt/cd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/vmnt/cd.ico -------------------------------------------------------------------------------- /vmnt/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by vmnt.rc 4 | // 5 | #define IDC_SETTINGS 3 6 | #define IDC_REREADLOOP 3 7 | #define IDC_DETAILS 3 8 | #define IDC_PAUSE 4 9 | #define IDC_IGNOREBAD 4 10 | #define IDC_REPORTBADSECTORS 5 11 | #define IDI_ICON2 101 12 | #define IDD_SELECTFOLDER 102 13 | #define IDD_SETTINGS 103 14 | #define IDD_EMPTY 105 15 | #define IDD_ISOPROGRESS 111 16 | #define IDD_BADSECTORS 112 17 | #define IDD_BADSECTORREPORT 113 18 | #define IDI_ICON1 114 19 | #define IDD_ISOBUILDPROGRESS 115 20 | #define IDC_DRIVELETTER 1001 21 | #define IDC_AUTOLETTERS 1002 22 | #define IDC_DRIVELETTER2 1002 23 | #define IDC_LANGSELECT 1002 24 | #define IDC_CDREADSPEED 1002 25 | #define IDC_NOAUTORUN 1003 26 | #define IDC_RADIO2 1004 27 | #define IDC_PERSISTENT 1004 28 | #define IDC_RADIO3 1005 29 | #define IDC_DISCTYPE 1005 30 | #define IDC_RADIO4 1006 31 | #define IDC_PERSISTENT2 1006 32 | #define IDC_MAKELOGFILE 1006 33 | #define IDC_CHECK1 1007 34 | #define IDC_COMBO1 1008 35 | #define IDC_REQUIREUAC 1008 36 | #define IDC_REQUIREADMIN 1008 37 | #define IDC_MOUNTISO 1008 38 | #define IDC_CHOOSELETTER 1009 39 | #define IDC_EJECTDISC 1009 40 | #define IDC_LTRPOLICY 1010 41 | #define IDC_OPENFOLDER 1010 42 | #define IDC_LANGUAGE 1011 43 | #define IDC_PROGRESS1 1012 44 | #define IDC_WHENDONE 1013 45 | #define IDC_PROGRESS2 1013 46 | #define IDC_CLOSEWINDOW 1014 47 | #define IDC_SOURCEDRIVE 1015 48 | #define IDC_IMAGEFILE 1016 49 | #define IDC_PROGRESSLINE 1017 50 | #define IDC_READSPEEDLBL 1018 51 | #define IDC_BADSECTORSREPORT 1019 52 | #define IDC_REREADONCE 1020 53 | #define IDC_EDIT1 1021 54 | #define IDC_DISCTYPELBL 1022 55 | #define IDC_FOLDER 1023 56 | #define IDC_ISOFILE 1024 57 | #define IDC_PROGRESSTEXT 1025 58 | #define IDC_FOLDERLABEL 1026 59 | #define IDC_ISOFILELABEL 1027 60 | 61 | // Next default values for new objects 62 | // 63 | #ifdef APSTUDIO_INVOKED 64 | #ifndef APSTUDIO_READONLY_SYMBOLS 65 | #define _APS_NEXT_RESOURCE_VALUE 116 66 | #define _APS_NEXT_COMMAND_VALUE 40001 67 | #define _APS_NEXT_CONTROL_VALUE 1028 68 | #define _APS_NEXT_SYMED_VALUE 101 69 | #endif 70 | #endif 71 | -------------------------------------------------------------------------------- /vmnt/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" -------------------------------------------------------------------------------- /vmnt/stdafx.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #define _CRT_SECURE_NO_WARNINGS 5 | 6 | // Change these values to use different versions 7 | #define WINVER 0x0500 8 | #define _WIN32_WINNT 0x0501 9 | #define _WIN32_IE 0x0501 10 | #define _RICHEDIT_VER 0x0200 11 | 12 | #define _SECURE_ATL 1 13 | 14 | #include 15 | #include 16 | 17 | extern CAppModule _Module; 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #ifndef _DEBUG 26 | #include "vmnt_lng.h" 27 | #endif 28 | 29 | 30 | #if defined _M_IX86 31 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 32 | #elif defined _M_IA64 33 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") 34 | #elif defined _M_X64 35 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 36 | #else 37 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 38 | #endif 39 | -------------------------------------------------------------------------------- /vmnt/versioninfo.h: -------------------------------------------------------------------------------- 1 | #include "../wcdversion.h" 2 | 3 | VS_VERSION_INFO VERSIONINFO 4 | FILEVERSION WINCDEMU_VERSION 5 | PRODUCTVERSION WINCDEMU_VERSION 6 | FILEFLAGSMASK 0x17L 7 | #ifdef _DEBUG 8 | FILEFLAGS 0x1L 9 | #else 10 | FILEFLAGS 0x0L 11 | #endif 12 | FILEOS 0x4L 13 | FILETYPE 0x1L 14 | FILESUBTYPE 0x0L 15 | BEGIN 16 | BLOCK "StringFileInfo" 17 | BEGIN 18 | BLOCK "000004b0" 19 | BEGIN 20 | VALUE "Comments", COMMENTS_STR 21 | VALUE "CompanyName", COMPANY_STR 22 | VALUE "FileDescription", "WinCDEmu mounter" 23 | VALUE "FileVersion", WINCDEMU_VERSION_STR 24 | VALUE "LegalCopyright", COPYRIGHT_STR 25 | VALUE "LegalTrademarks", TRADEMARKS_STR 26 | VALUE "OriginalFilename", "vmnt.exe" 27 | VALUE "ProductName", PRODUCTNAME_STR 28 | VALUE "ProductVersion", WINCDEMU_VERSION_STR 29 | END 30 | END 31 | BLOCK "VarFileInfo" 32 | BEGIN 33 | VALUE "Translation", 0x0, 1200 34 | END 35 | END 36 | 37 | -------------------------------------------------------------------------------- /vmnt/vmnt.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | Header Files 64 | 65 | 66 | Header Files 67 | 68 | 69 | Header Files 70 | 71 | 72 | Header Files 73 | 74 | 75 | Header Files 76 | 77 | 78 | 79 | 80 | Resource Files 81 | 82 | 83 | Resource Files 84 | 85 | 86 | 87 | 88 | Resource Files 89 | 90 | 91 | -------------------------------------------------------------------------------- /vmnt/wcd-icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sysprogs/WinCDEmu/07e0924d51f6e7fdfb316143de810be085123c6d/vmnt/wcd-icon.ico -------------------------------------------------------------------------------- /wcdversion.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define WINCDEMU_VERSION 4,1 3 | #define WINCDEMU_VERSION_STR "4.1" 4 | #define COPYRIGHT_STR "LGPL" 5 | #define TRADEMARKS_STR "Sysprogs" 6 | #define PRODUCTNAME_STR "WinCDEmu" 7 | #define COMPANY_STR "Sysprogs OU" 8 | #define COMMENTS_STR "http://wincdemu.sysprogs.org/" 9 | #define WINCDEMU_VER_INT 0x04010001 10 | --------------------------------------------------------------------------------