如何得到CDROM中刻录盘的信息如刻录盘的容量,已用空间,可用空间等?

解决方案 »

  1.   

    难道WINDOWS就没提供这样的API??
      

  2.   

    xp的sdk应该有.其实很多都是用的nero的sdk啦.
      

  3.   

    查看vs.net msdn光盘中的msdn library-windows开发-windows基础服务-设备i/o-sdk文档-Image Mastering API-IMAPI Reference里面提供了一些api可用
    IDiscRecorderThe IDiscRecorder interface enables access to a single disc recorder device, labeled the active disc recorder. An IMAPI object such as MSDiscMasterObj maintains an active disc recorder.An IDiscRecorder object represents a single hardware device, but there can be multiple instances of IDiscRecorder all referencing the same hardware device. In this case, use OpenExclusive to access that device.
    When To Use
    Use an instance of this object to select the recorder for a burn through IDiscMaster and to perform basic control tasks on a specific physical disc recorder.Note  An application does not call CoCreateInstance for one of these objects, but instead uses the IDiscMaster::EnumDiscRecorders method to retrieve an enumerator that returns pointers to all the recorders valid for a specific format.Methods in Vtable Order
    The IDiscRecorder interface inherits the methods of the standard COM interface IUnknown.In addition, IDiscRecorder defines the following methods. Method Description 
    Init Initializes the object for an underlying device. 
    Used internally only.
     
    GetRecorderGUID Retrieves the underlying device GUID. 
    GetRecorderType Identifies device as CD-R or CD-RW. 
    GetDisplayNames Retrieves a name suitable for GUI display. 
    GetBasePnPID Returns identifier unique to device class. 
    GetPath Returns an OS path to the device. 
    GetRecorderProperties Retrieve a pointer to the IPropertyStorage interface for the recorder. 
    SetRecorderProperties Set properties for the recorder. 
    GetRecorderState Checks if recorder is ready to burn. 
    OpenExclusive Opens a device for exclusive use. 
    QueryMediaType Identifies the type of media in the recorder. 
    QueryMediaInfo Retrieves media properties. 
    Eject Ejects a recorder's tray, if possible. 
    Erase Erases CD-RW media, if possible. 
    Close Close a recorder after exclusive access. 
    应该可以通过的QueryMediaInfo的返回值来计算出你所需要的数据
      

  4.   

    欢迎访问我的主页httP://hesicong2004.533.net
      

  5.   

    先用GetDriveType获得磁盘类型
    再用GetDiskFreeSpace获得剩余空间
      

  6.   

    API是不可能有的。
    刻录机属于SCSI设备,试试SCSI命令或许可以。DDK里头有例子,spti好像。
      

  7.   

    无论是win98还是winxp,都可用nero提供的sdk,下载地址:ftp://ftp6.nero.com/NeroSDK-v1.05.zip
    里面有实例
      

  8.   

    http://www.vckbase.com/document/viewdoc/?id=1113