Click here to Skip to main content
11,718,016 members (84,436 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC6 VC7 MFC Development
HI ,

I know that Multisession using UDF filesystem is not supported in Windows Xp.so I choose Joliet to archive Multisession on bd -r disc.

I also know that Joliet filesystem requirs the file to be burned must be little than 4G. I am not sure if i can use Joliet on Bd- r because the capacity of the bd -r is 25G/50G.



code:

IMAPI_MEDIA_PHYSICAL_TYPE mediaType = IMAPI_MEDIA_TYPE_UNKNOWN;
discFormatData.GetInterface()->get_CurrentPhysicalMediaType(&mediaType);
// mediatype is BDR
image->ChooseImageDefaultsForMediaType(mediaType);
 
//Instead of the default UDF filesystem,using Joliet to archieve the multisession on xp
hr = image->put_FileSystemsToCreate((FsiFileSystems)(FsiFileSystemJoliet|FsiFileSystemISO9660));
 
VARIANT_BOOL vbBlank ;
discFormatData.GetInterface()->get_MediaHeuristicallyBlank(&vbBlank);
 

 
if(vbBlank == VARIANT_TRUE)
{
    BSTR bstrFileName = strFileName.AllocSysString();
    image->put_VolumeName(bstrFileName);
    SysFreeString(bstrFileName);
 

}
else
{
    SAFEARRAY *pSafeArrayMulSection = NULL;
    HRESULT hrTemp = discFormatData.GetInterface()->get_MultisessionInterfaces(&pSafeArrayMulSection);
    if(!SUCCEEDED(hrTemp))
    {
 
        return FALSE;
    }
 
    if(SUCCEEDED(hrTemp))
    {
 
        VARIANT *va = NULL ;
        SafeArrayAccessData(pSafeArrayMulSection,(VOID**)&va);
        if(va)
        {
            IMultisession *pMultisession = NULL ;
            pMultisession = (IMultisession*)va[0].pdispVal;
            hr = pMultisession->put_InUse(VARIANT_TRUE);
            if(!SUCCEEDED(hr))
            {
                ::OspPrintf(TRUE,TRUE,"ERROR:Multiple session Inuse failed\n");
            }
        }
        hrTemp = image->put_MultisessionInterfaces(pSafeArrayMulSection);
        if (!SUCCEEDED(hrTemp))
        {
            ::OspPrintf(TRUE,TRUE,"put_MultisessionInterfaces Failed ! Code: OX%08x",hrTemp);
            ::OspPost(MAKEIID(CDBURN_APP_ID,1),BURN_MULTISESSION_ERROR,&tParam,sizeof(TParam),0);
            return FALSE;
        }
 
        FsiFileSystems fs;
        hr = image->GetDefaultFileSystemForImport((FsiFileSystems)(FsiFileSystemJoliet|FsiFileSystemISO9660),&fs);
 
        FsiFileSystems filesystem ;
        hrTemp = image->ImportFileSystem(&filesystem);
        if(!SUCCEEDED(hrTemp))
        {
 
            return FALSE;
        }
    }// getmultisession
    SafeArrayDestroy(pSafeArrayMulSection);
 

}
LONG lFreeSectorOnMedia = 0;
hr = discFormatData.GetInterface()->get_FreeSectorsOnMedia(&lFreeSectorOnMedia);
if(SUCCEEDED(hr))
{
// lFreeSectorOnMedia is about 50G in byts ,could I set the FreeMediaBlocks property of Image which uses Joliet filesystem, so large?
    hr = image->put_FreeMediaBlocks(lFreeSectorOnMedia);
}
Posted 31-Aug-10 18:21pm
Edited 31-Aug-10 21:43pm
(no name)41.8K
v2

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

  Print Answers RSS
0 OriginalGriff 215
1 F-ES Sitecore 210
2 Maciej Los 140
3 Jochen Arndt 120
4 Andy Lanng 115
0 Sergey Alexandrovich Kryukov 1,649
1 OriginalGriff 535
2 Maciej Los 529
3 Richard MacCutchan 440
4 CHill60 415


Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 1 Sep 2010
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100