Thread: drive reading

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    77

    drive reading

    is there anyway to create a program that can auto read the cd rom when a disc is insert and return all the file item's name in the disc ???

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793

    Re: drive reading

    Originally posted by monkeymon
    is there anyway to create a program that can auto read the cd rom when a disc is insert and return all the file item's name in the disc ???
    I may be slow this morning, but I dont understand what you are talking about...........

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    77
    i will like to write a code that will return mi the item name in a cd from the cd rom.
    that is wat i mean

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    50
    I suggest you search msdn for that:

    msdn.microsoft.com

    Windows XP does it by default and MSDN is literally SOAKING in functions that do this.

    Windows loves to auto read discs. It does it all the time. It does it by default, but only XP does something about it.

    Try looking it up before you come to us...

    I have read most of your posts and you keep asking for help without demonstrating any prior effort on your part. That doesn't help us, and most of all it doesn't help YOU because it doesn't let US help YOU.

    That's like walking up to someone on the street and asking "What is the answer?" without them having any idea what the question is.

  5. #5
    Registered User
    Join Date
    Apr 2002
    Posts
    77
    sorry if it is ignoring
    becoz i only learn the dos programing before and window programing is something very new to me. somemore wat i learn is MFC, so the function or thye coding to window programing is very limited.

    or can u tell mi which to search in the msdn, becoz i actually have search for it before come here for help. i cant really find the thing i wan in the msdn.
    Last edited by monkeymon; 05-24-2002 at 01:35 PM.

  6. #6
    Registered User
    Join Date
    Apr 2002
    Posts
    77
    can anyone teach how to use the CFile class
    i found out that there is a function getname in the class
    Last edited by monkeymon; 05-24-2002 at 02:28 PM.

  7. #7
    Registered User
    Join Date
    Feb 2002
    Posts
    589
    MSDN is your friend. Search for CFile. Select one of the replays, Find the Class members link and voila. this is what you can do with the CFile class.And how you do it.
    Last edited by Barjor; 05-24-2002 at 02:47 PM.

  8. #8
    Registered User
    Join Date
    Apr 2002
    Posts
    77
    thanks i have found wat im looking for in the msdn

    Code:
    try
       {
          // try to open the file
          CFile sysFile(_T("C:\\WINDOWS\\SYSTEM.INI"), CFile::modeRead);
    
          // print out path name and title information
          _tprintf(_T("Path is : \"%s\"\n"), (LPCTSTR) sysFile.GetFilePath());
          _tprintf(_T("Name is : \"%s\"\n"), (LPCTSTR) sysFile.GetFileName());
          _tprintf(_T("Title is: \"%s\"\n"), (LPCTSTR) sysFile.GetFileTitle());
    
          // close the file handle
          sysFile.Close();
       }
       catch (CFileException* pEx)
       {
          // if an error occurs, just make a message box
          pEx->ReportError();
          pEx->Delete();
       }
    but there is something im not very sure about..
    CFile sysFile(_T("C:\\WINDOWS\\SYSTEM.INI"), CFile::modeRead);
    wat is the CFile::moderead for ????

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SATA HDD failure
    By PING in forum Tech Board
    Replies: 4
    Last Post: 12-23-2008, 12:25 AM
  2. Detect SCSI Hard Drive Serial Number
    By mercury529 in forum Windows Programming
    Replies: 3
    Last Post: 10-17-2006, 06:23 PM
  3. Reading drive dirt.
    By Queatrix in forum C++ Programming
    Replies: 2
    Last Post: 01-14-2006, 05:32 PM
  4. is this old hard drive any good?
    By Pyroteh in forum Tech Board
    Replies: 11
    Last Post: 07-16-2005, 08:34 PM
  5. reading and writeing data to hard drive
    By Neuby_44 in forum C Programming
    Replies: 4
    Last Post: 01-26-2003, 11:46 PM