1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to raw read DVD? we need help!

Discussion in 'DVDR' started by zhaopz, Dec 8, 2007.

  1. zhaopz

    zhaopz Member

    Joined:
    Nov 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    When copy Cdrom, we can use the IOCTL_CDROM_RAW_READ to read the CD-ROM, but copy DVD-ROM, what is the fastest method? How to raw read DVD-ROM? we need help, please help me.
     
  2. Rotary

    Rotary Senior member

    Joined:
    Apr 10, 2003
    Messages:
    8,353
    Likes Received:
    0
    Trophy Points:
    116
    not quite sure what you need? although i have heard the terminology...
     
  3. olyteddy

    olyteddy Regular member

    Joined:
    Dec 18, 2006
    Messages:
    606
    Likes Received:
    0
    Trophy Points:
    26
    ImgBurn is a real good DVD copying program. It can read a dvd into an ISO file and then burn that ISO to a blank. Is this what you mean?
     
  4. ZoSoIV

    ZoSoIV Regular member

    Joined:
    Oct 24, 2007
    Messages:
    4,118
    Likes Received:
    0
    Trophy Points:
    46
    lol I'm lost to need more info buddy
     
  5. Rotary

    Rotary Senior member

    Joined:
    Apr 10, 2003
    Messages:
    8,353
    Likes Received:
    0
    Trophy Points:
    116
    lol - me too...
     
  6. zhaopz

    zhaopz Member

    Joined:
    Nov 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    I am C programer, in our program i have used the IOCTL_CDROM_RAW_READ to raw read the CD, now i want to raw read DVD, but i donot know what to do in our program. How to raw read DVD? Tks, i need help.
     
  7. ZoSoIV

    ZoSoIV Regular member

    Joined:
    Oct 24, 2007
    Messages:
    4,118
    Likes Received:
    0
    Trophy Points:
    46
    a store bought dvd? or a dvd with the protection removed? and what are you wanted to do with the dvd? back it up? or just read it to your HD? etc.

    you can use dvd decrypter to read it to your HD if the protection is removed

    http://webpages.charter.net/bacitup/
     
  8. Rotary

    Rotary Senior member

    Joined:
    Apr 10, 2003
    Messages:
    8,353
    Likes Received:
    0
    Trophy Points:
    116
    If the IOCTL is from user mode, Irp->AssociatedIrp.SystemBuffer contains a RAW_READ_INFO structure that specifies the starting disk offset, the sector count, and the track mode (XA or CDDA) for the read. Parameters.DeviceIoControl.InputBufferLength specifies the size, in bytes, of the structure, which must be >= sizeof(RAW_READ_INFO). Parameters.DeviceIoControl.OutputBufferLength specifies the size of the buffer to be read, which must be >= sizeof(SectorCount * RAW_SECTOR_SIZE).

    If the IOCTL is from kernel mode, Parameters.DeviceIoControl.Type3InputBuffer contains a structure that specifies the starting disk offset, the sector count, and the track mode (XA or CDDA) for the read. Parameters.DeviceIoControl.OutputBufferLength specifies the size of the buffer, in bytes, to be read, which must be >= sizeof(SectorCount * RAW_SECTOR_SIZE).

    it should be exactly the same to raw read a dvd as a cd, as long as you know wher and whereto (sectors and offset) you want to read

    what happens is the driver writes the requested bytes directly (using DMA or PIO) to the buffer described by the MDL at Irp->MdlAddress.

    then there are a couple of system calls..

    IO..If the read is successful, the driver sets Status to STATUS_SUCCESS and Information to the number of bytes transferred. If the read is not successful, the driver sets Information to zero and Status to possibly STATUS_INVALID_PARAMETER, STATUS_INSUFFICIENT_RESOURCES, or STATUS_INVALID_DEVICE_REQUEST.

    but you need to have dependencies available in an (include) ..Defined in ntddcdrm.h. Include ntddcdrm.h.

    info will be in just about any modern C++ reference manual

    heres the structure if you want it.. there should be exactly no difference (apart from sectors/offset between cd and dvd devices

    typedef struct __RAW_READ_INFO {
    LARGE_INTEGER DiskOffset;
    ULONG SectorCount;
    TRACK_MODE_TYPE TrackMode;
    } RAW_READ_INFO, *PRAW_READ_INFO;

    DiskOffset
    Contains an offset into the CD-ROM disc where data will be read.
    SectorCount
    Contains the number of sectors to read.
    TrackMode
    Contains an enumerator of type TRACK_MODE_TYPE that indicates the type of the track mode.

    YellowMode2
    Indicates that CD-ROM mode should be used. This mode is used with read-only 120 mm Optical Data Discs (CD-ROM). XAForm2 Indicates that compact disc read-only memory extended architecture mode should be used. CDDA Indicates that digital audio information mode should be used.
     
    Last edited: Dec 9, 2007
  9. zhaopz

    zhaopz Member

    Joined:
    Nov 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    Thanks Rotary! You are very good, and i will try it.
     
  10. cemen

    cemen Member

    Joined:
    Dec 12, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    I try to use IOCTL_CDROM_RAW_READ to read DVD, but failed. My vc++ code is following. Is there some wrong? Please help me.

    typedef enum _TRACK_MODE_TYPE {
    YellowMode2,
    XAForm2,
    CDDA
    } TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;

    typedef struct __RAW_READ_INFO {
    LARGE_INTEGER DiskOffset;
    ULONG SectorCount;
    int TrackMode;
    } RAW_READ_INFO, *PRAW_READ_INFO;

    #define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
    #define IOCTL_CDROM_RAW_READ CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS)

    BOOL RawRead(HANDLE h, int offset, int mode)
    {
    DWORD dwOutBytes;
    RAW_READ_INFO rri;
    char buf[2352];
    BOOL ret;

    rri.TrackMode = mode/*XAForm2*/;
    rri.SectorCount = (DWORD)1;
    rri.DiskOffset.QuadPart =(DWORD64)offset*2048;

    ret = DeviceIoControl(h,
    IOCTL_CDROM_RAW_READ,
    &rri,
    sizeof(rri),
    buf,
    (DWORD)sizeof(buf),
    &dwOutBytes,
    (LPOVERLAPPED)NULL);

    TRACE("mode=%d, ret=%d, error=%d\n", mode, ret, GetLastError());

    return ret;
    }

    I try all TRACK_MODE_TYPE, the output is:
    mode=0, ret=0, error=1
    mode=1, ret=0, error=1
    mode=2, ret=0, error=1
     
  11. cemen

    cemen Member

    Joined:
    Dec 12, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    I can work for CD, but can not work for DVD. Please help me, thank you.
     
  12. zhaopz

    zhaopz Member

    Joined:
    Nov 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    Hi Rotary,
    it can work for CD, but can not work for DVD, do you know why? please help! Thank you very much!
     
  13. zhaopz

    zhaopz Member

    Joined:
    Nov 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    I am failed again, and who can help me? i am waiting...

    ------------------------------------------
    I try to use IOCTL_CDROM_RAW_READ to read DVD, but failed. My vc++ code is following. Is there some wrong? Please help me.

    typedef enum _TRACK_MODE_TYPE {
    YellowMode2,
    XAForm2,
    CDDA
    } TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;

    typedef struct __RAW_READ_INFO {
    LARGE_INTEGER DiskOffset;
    ULONG SectorCount;
    int TrackMode;
    } RAW_READ_INFO, *PRAW_READ_INFO;

    #define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
    #define IOCTL_CDROM_RAW_READ CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS)

    BOOL RawRead(HANDLE h, int offset, int mode)
    {
    DWORD dwOutBytes;
    RAW_READ_INFO rri;
    char buf[2352];
    BOOL ret;

    rri.TrackMode = mode/*XAForm2*/;
    rri.SectorCount = (DWORD)1;
    rri.DiskOffset.QuadPart =(DWORD64)offset*2048;

    ret = DeviceIoControl(h,
    IOCTL_CDROM_RAW_READ,
    &rri,
    sizeof(rri),
    buf,
    (DWORD)sizeof(buf),
    &dwOutBytes,
    (LPOVERLAPPED)NULL);

    TRACE("mode=%d, ret=%d, error=%d\n", mode, ret, GetLastError());

    return ret;
    }

    I try all TRACK_MODE_TYPE, the output is:
    mode=0, ret=0, error=1
    mode=1, ret=0, error=1
    mode=2, ret=0, error=1
     
  14. zhaopz

    zhaopz Member

    Joined:
    Nov 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    Who can help me? Rotary where are you?
     

Share This Page