I'm trying to write two sets of files to a data disc in separate recording sessions. I'm getting an IMAPI_E_IMPORT_MEDIA_NOT_ALLOWED error from IFileSystemImage::put_MultisessionInterfaces the second time I try to write files, but I'm sure I'm not doing something correctly. (The media is DVD-RW). What is the correct procedure for appending files to a data disc

How to append data?
jeff357
The Vista RTM release does not support Hard Disk (HD ) media. It also does not support BD-R, BD-RE, HD-DVD-R, HD-DVD-RW (in case you meant any of those).
hth,
.
gifuran
Yes, we do append data on these supported media given that they are not close or write protected. But no, you do not create the IMultisessionInterface objects, instead you retrieve a IMultisessionInterface SAFEARRAY from IDiscFormat2Data::get_MultisessionInterfaces - see http://msdn.microsoft.com/library/en-us/imapi/imapi/idiscformat2data_get_multisessioninterfaces.asp
We are feature freezed for Vista for multiple months already, we are only working on bug fixes at this time. We do not yet support blue laser technologies in IMAPI2, however it is quite easy for 3rd partues to extend it with a new disc data format. Also the UDF life file system of Vista does already support some of the blue laser technologies.
We will announce release of IMAPI2 update on this present forum.
Hassank
The Microsoft implementation of IFileSystemImage does not support yet multi-session for rewritable DVDs. We are aware of this limitation and seriously considering to add this feature in a later update of IMAPI. For now, multi-session support is limited to CD-R/RW, DVD-/+R Single Layer (that is, all media for which one can implement IMultisessionSequential).
Note that one may also write his own implementation of IFileSystemImage with support for new multi-session type. This is not a small task, although.
Kunal Sharma
So how do you actually append data to supported media (CD-R/RW, DVD-/+R) I'm assuming you have to call IFileSystemImage::put_MultisessionInterfaces; but how do you get the SAFEARRAY list of multi-session interfaces in the first place Do you call CoCreateInstance to create a IMultisessionInterface object first and then build a SAFEARRAY from scratch
Do you mean multi-session support for rewritable DVD media will be available in RTM of Vista, or sometime afterwards Does IMAPIv2 support multi-sessions on blu-ray and HD media, or is that also in the future
Where can I find out about changes to IMAPIv2 as they become available
j_o_h_a_n_n_e_s
DavidThi808
I would consider the inability to do multi-session on DVD+/-RW (a common media), and the lack of support for the latest formats (blue-ray and high definition) to be disappointing limitations. (Not to mention no data verification). Do you currently have any plans to fill these missing holes
shanthi
We are committed to releasing regular updates to optical platform and have said so publicly in forums such as WinHEC. The purpose of these updates is add support as required by the industry and market. Multi-session support on DVD+/-RW media and support for next generation optical formats is already on the list of things we want to do and these items will be scheduled for inclusion in an future update to the optical platform. We can not currently commit to a schedule but please keep your eyes open.
bluebunny
Hi,
I have a similar question. I'm having trouble understanding the big picture here. If someone could explain the basic flow, that would help as well.
Thsi is an app for writing images to a CD.
How do you get the images on the previous session written to the next session When I write to a blank CD, everything is fine - the images are written. I'm not understanding what "processing" needs to be done to the previous session to get it written (along with the new images) to the next session.
What do you do after you retrieve the SAFEARRAY There are many interfaces returned. After ( ) selecting the right interface (how ) then what needs to be done Do I need to iterate thru the IDiscRecorder2
Thanks!!
George
SAFEARRAY *psaMultiSessionInterfaces;
hr = m_pDiscFormat2Datas[m_nSelectedDrive]->get_MultisessionInterfaces(&psaMultiSessionInterfaces);
if (psaMultiSessionInterfaces->cbElements < 1) // empty array
return FALSE;
VARIANT* pvarArray;
if (FAILED(SafeArrayAccessData(psaMultiSessionInterfaces,(void**) &pvarArray)))
return FALSE;
variant_t var = pvarArray[0];
CComQIPtr<IMultisessionSequential> pMultiSessionSequential = var.pdispVal;
if (pMultiSessionSequential)
{
//how many sessions have been written
VARIANT_BOOL bVariantFirstDataSession;
pMultiSessionSequential->get_IsFirstDataSession(&bVariantFirstDataSession);
IDiscRecorder2 *pcurrIDiscRecorder2;
pMultiSessionSequential->get_ImportRecorder(&pcurrIDiscRecorder2);
rarpit
You can let the IFileSystemImage select a multisession interface it is compatible with by simply passing the multisession interfaces array unchanged. Selecting a particular multisession interface is revelant only if you have inner knowledge of different multisession types and have a reason to select one over another. Currently you can simply let the IFileSystemImage parse through the array and select the interface it likes.
The needed processing for multi-session is that the new session file system needs to refer the previous session's file system. This is needed because the system that eventually will read the media will not natively look at previous sessions. Instead it will look at the latest session on the disc. Thus to preserve the content of the previous sessions, you need to refer the previous session in the new session. For instance if you have three sessions, the second session will point to the first session, and the third session will point to the second session. Connecting the IFileSystemImage to the IDiscFormat2Data through IMultiSessionInterface allows to do this necessary referencing of the previous session.