Click here to Skip to main content
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 19:21pm
Edited 31-Aug-10 22:43pm
(no name)41.7K
v2

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

  Print Answers RSS
0 Maciej Los 295
1 OriginalGriff 273
2 Aajmot Sk 234
3 Marcin Kozub 205
4 Richard MacCutchan 200
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 1 Sep 2010
Copyright © CodeProject, 1999-2014
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