当前位置:网站首页>Procedure steps for burning a disc

Procedure steps for burning a disc

2022-06-26 18:08:00 Let it be~

​​​​​ Standardized recording program architecture and process msdn Of Burn steps .

Data burning:

  1. Detect proper drive (IDiscMaster2 => IDiscRecorder2)
  2. Create image IFileSystemImage & fill it:
  3. Configure burner IDiscFormat2Data & write your image

Translate it :

1、 Check if there is any equipment , Interface IDiscMaster2 Check how many devices there are , Get the number of devices and the identifier of the device uniqueID, Then use the device identifier (uniqueID), Interface IDiscRecorder2 Initialize to a recorder object .

2、 Create file system , And give the interface object the file or folder you want to burn IFileSystemImage. Here's a question to pay attention to , When using multi section recording , Blank disk directly , Directly create a file system , And then burn it .( Important things are to be repeated for 3 times : Don't put put_ForceMediaToBeClosed The arguments to the function are set to TRUE, Don't put put_ForceMediaToBeClosed The arguments to the function are set to TRUE, Don't put put_ForceMediaToBeClosed The arguments to the function are set to TRUE. Because this will mark the completion of those disks that are written once and read many times , In the future, no matter how much disk space is left , You can't burn it again . I have ruined a lot of the truth that I learned . Microsoft notes :

Set to VARIANT_TRUE to mark the disc as closed to prohibit additional writes when the next write session ends.
Set to VARIANT_FALSE to keep the disc open for subsequent write sessions. The default is VARIANT_FALSE

among , When the disc is empty , To create a file system ,IFileSystemImage Medium put_FileSystemToCreate, Parameters There are these , Use other functions to find out , Then pass it to this parameter , You can also specify these parameters directly , After all, these parameters represent the popular .FsiFileSystems(None、ISO9660、Joliet、UDF、UNknown), Just splice the in brackets and the front . If the disc is not empty , Never use this function to create . According to my read-only 、 Append written CD\DVD, If the disk is not empty , The second time, it also creates , This will make the disk unreadable .

I added that I used get_MultisessionInterfaces This acquisition SAFEARRAY Type of multiSession, call put_MultisessionInterfaces This function Set multi section write , Implement additional write .

3、 At this time, file data should be prepared .IFileSystemImage Medium get_Root Initialize an object similar to the root directory , Then the object is related to the file data to be recorded . There will also be some problems , For example, the file name is unqualified , Filename conflict 、 The directory name is too long .

IFileSystemImage Medium CreateResultImage The function must be called when the file data is ready . The output parameter type is IFileSystemImageResult.

IFileSystemImageResult Medium get_ImageStream Function will have an output parameter , This parameter prepares the above file data into the recording buffer ,

Then call IDiscFormat2Data Of write Function can be simply burned .

Rookie's cooking ideas , Commemorate .

Just look at API You can't , Because it's like giving you four character idioms , Let you write your composition , Random arrangement is not a composition .msdn There are also steps for writing out a CD , But if you only look at others' words and don't think for yourself , Will not remember firmly . So write it yourself ( No grievance ).

1、IMaster( I can't remember the specific name very clearly ) Interface to get how many devices are connected to the system , You can get the number and enumerate each device .

2、Recorder Interface ( I can't remember the specific name very clearly ), According to 1 Zhongmei cited the devices to create a CD writer , You can get the type of disc supported by the recorder .

3、discFormatData Interface , involves CD or DVD File format .CD and DVD It is also similar to the hard disk , Saving various files requires various file systems , The simplest is what format the directory and file name should be saved in , This makes it convenient to index files . This interface can get CD and DVD Supported file formats .

4、image( The name is not correct , This is the way I understand , I can skip the part I understand ) Is a file image , according to 3 Get the file format , You can create a file operation manager . Commonly known as mirror image . Get the path to the file you want to burn , Convert it to a data stream to burn .

5、ISTREAM( I'm sure of that ) Burn data stream , Recorder call write Function burn , Actually perform recording .msdn Say above , It is best not to pause while recording , Especially if the recording time is long , The system will be interrupted , Lead to CD or DVD Unavailable . There are two reasons (1、power transitions 2、user to log off User logout )

6、 Finished writing , Close all that need to be closed , If you want to add another recording , Do not use this function  put_ForceMediaToBeClosed Set to TRUE.

from : CD burning Series II program steps for burning a CD _ Baobab blog -CSDN Blog

原网站

版权声明
本文为[Let it be~]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206261803220678.html