Exemple #1
0
 /// <summary>
 /// Returns a platform-specific name for a CD-ROM drive
 /// </summary>
 /// <remarks></remarks>
 /// <returns>A platform-specific name, i.e. "D:\"</returns>
 public string DriveName()
 {
     if (!CDRom.IsValidDriveNumber(this.index))
     {
         throw new SdlException(Events.StringManager.GetString("IndexOutOfRange", CultureInfo.CurrentUICulture));
     }
     return(Sdl.SDL_CDName(this.index));
 }
Exemple #2
0
 /// <summary>
 /// Represents a CD drive on the system
 /// </summary>
 /// <param name="handle">Handle to CDDrive</param>
 /// <param name="index">Index number of drive</param>
 /// <remarks>used internally</remarks>
 internal CDDrive(IntPtr handle, int index)
 {
     if ((handle == IntPtr.Zero) || !CDRom.IsValidDriveNumber(index))
     {
         throw SdlException.Generate();
     }
     else
     {
         this.Handle = handle;
         this.index  = index;
     }
 }