Writing files to a CD

This is a discussion on Writing files to a CD within the Windows Programming forums, part of the Platform Specific Boards category; Hello there. My friend and I are designing an interface for a CD burner program. We are using a dialog-based ...

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Question Writing files to a CD

    Hello there. My friend and I are designing an interface for a CD burner program. We are using a dialog-based MFC application and I have a question. I would like to know how I would go about writing data to a blank CD. If you have any ideas or suggestions please reply =)!
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  2. #2
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    I had this problem some time ago & made some personal notes on the problem. Perhaps someone out there can provide further info.

    Anyway, hope the following helps.

    Attempts to save files directly to CD have result in the application reporting an ‘access denied’ error. After an investigation, the following was found to be the case.

    On older Windows systems, CD writing is supported by third-party software, commonly Adaptec DirectCD. It appears that this software supports direct system write calls to the CD, hence writing files to the CD under these conditions is possible.

    However, under later version of Windows, namely XP and 2000, CD writing is supported natively. The writing process has changed and direct system write calls are no longer supported. Therefore, an attempt to write directly to a CD path will fail. Instead, Windows 2000 and XP support a different process. When a user attempts to copy a file to the CD using Windows Explorer, the files are actually copied to a ‘CD Burning’ temporary directory. These files are only written to the CD prior to ejection.

    It should be recognised that Windows applications in general do not support direct saving of files to CD under later versions of Windows. Not even Microsoft Word (2002) supports this, and it is accepted behaviour. However, if direct CD writing is to be a requirement, it is proposed that the application support the following steps when writing a file:

    1. The application attempts to write the file as normal.
    2. If writing fails with an ‘access denied’ error, the application should check whether the file path is located on a writable CD drive.
    3. If this is the case, the application should attempt to locate the temporary CD Burning directory from the Windows registry.
    4. If this is found, the application should write the file to this location, preserving any relevant directory structure.

    Finally, it should be noted that this sequence of steps may prove problematic on computer systems possessing multiple CD writer drives, and further investigation may be necessary.
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

    BigAngryDog.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  2. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 09:44 AM
  3. Nested for loop...search & display a list within a list
    By chadsxe in forum C++ Programming
    Replies: 13
    Last Post: 07-20-2005, 02:34 PM
  4. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 11:36 AM
  5. Writing to files on exact spots
    By R@m0n in forum C++ Programming
    Replies: 3
    Last Post: 02-10-2002, 06:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21