Click here to Skip to main content
Licence CPOL
First Posted 31 Mar 2009
Views 8,021
Downloads 211
Bookmarked 11 times

CD-Rom DLL for easy access to CD-Rom

By | 31 Mar 2009 | Article
Class library for easy access to CD-ROM (CdRom) opening CD-Rom, C, Name of CD-Rom company in a line of code.

Introduction

This project aims to provide easy access to CD-ROM properties and functions. This is a class library for .NET and is written in C# language. It has only one DLL and you can access the CD-ROM with only one line code.

Using the Code

This is very easy. Go to your destination project and add DLL as a reference, in this way -> project menu//add reference //Browse Tab// and locate DLL, then import it:

using CdRom;

Then, with this code declare a new class:

CDRom cd_rom = new CDRom();

For catching the name of CD-ROMs and printing in Listbox:

foreach(string temp in cd_rom.CDRomName)
      listBox1.Items.Add(temp);

Name of all drives:

foreach (string temp in cd_rom.DriveName)
        listBox1.Items.Add(temp);

A bool that indicates whether CD is inserted or not:

cd_rom.CdinCDRom;

If CD inserted == true, then name(Label) of CD is:

cd_rom.CdName;

And finally, string indicates the drive of CD-ROM:

cd_rom.CdDriveName;

History

  • 31st March, 2009: Version 1,0,0
    This is the first version of this DLL and will be updated soon.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

arash yega

Engineer
Abtin CO.
Iran (Islamic Republic Of) Iran (Islamic Republic Of)

Member

I'm engineer in Computer SCIENCE,i'm Work on indexing & software protection,and working in Abtin Co,

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120517.1 | Last Updated 31 Mar 2009
Article Copyright 2009 by arash yega
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid