http://bugs.winehq.org/show_bug.cgi?id=20935
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #6 from Anastasius Focht focht@gmx.net 2010-02-22 14:40:43 --- Hello,
--- quote --- First - This game uses SecuROM, i.e. nasty copy protection. The DVD version i own is v2.0 and uses SecuROM v7.27.0014. This is a no go in current wine, because it fails with:
fixme:ntdll:server_ioctl_file Unsupported ioctl 2d0c04 (device=2d access=0 func=301 method=0)
wine: Unhandled page fault on read access to 0x00000000 at address 0x146e303 (thread 0009), starting debugger... --- quote ---
the IOCTL_STORAGE_GET_MEDIA_TYPES_EX check is bugged in some SecuROM versions (hence the crash).
From my own experience it appeared in SecuROM versions 7.2x.xxxx.
There are many games/apps in the wild that use that one (along with other checks) so it's worthwhile to fix this.
The most common symptom is the 0x2d0c04 device ioctl fixme followed by a crash:
--- snip --- 0034:Call KERNEL32.CreateFileA(009ee2d4 "\\.\D:",c0000000,00000003,00000000,00000003,00000000,00000000) ret=0087ea39 0034:Ret KERNEL32.CreateFileA() retval=0000001c ret=0087ea39 0034:Call KERNEL32.DeviceIoControl(0000001c,002d0c04,00000000,00000000,00d40c7f,00000400,00d415a4,00000000) ret=00885920 0034:fixme:ntdll:server_ioctl_file Unsupported ioctl 2d0c04 (device=2d access=0 func=301 method=0) 0034:Ret KERNEL32.DeviceIoControl() retval=00000000 ret=00885920 0034:trace:seh:raise_exception code=c0000005 flags=0 addr=0x885956 ip=00885956 tid=0034 0034:trace:seh:raise_exception info[0]=00000000 0034:trace:seh:raise_exception info[1]=00000000 0034:trace:seh:raise_exception eax=00000000 ebx=00000000 ecx=00000000 edx=ffffffff esi=009ebeac edi=009ebeac 0034:trace:seh:raise_exception ebp=00d415c0 esp=00d40c50 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010296 0034:trace:seh:call_vectored_handlers calling handler at 0x79d8debe code=c0000005 flags=0 0034:trace:seh:call_vectored_handlers handler at 0x79d8debe returned 0 0034:trace:seh:call_stack_handlers calling handler at 0x8ed8e5 code=c0000005 flags=0 0034:trace:seh:call_stack_handlers handler at 0x8ed8e5 returned 1 --- snip ---
IOCTL_STORAGE_GET_MEDIA_TYPES_EX is described in MSDN:
http://msdn.microsoft.com/en-us/library/aa363413.aspx
Fortunately SecuROM versions that use this check only look at the DeviceType field, specifically they check for DeviceType == FILE_DEVICE_CD_ROM (0x2) or DeviceType == FILE_DEVICE_DVD (0x33).
The DEVICE_MEDIA_INFO array of GET_MEDIA_TYPES struct part is completely ignored (either pass MediaInfoCount = 0 or fill it with whatever RemovableDiskInfo values).
You can get away with simple implementation.
Regards