### IRawCDImageCreator::get_StartOfLeadout Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-irawcdimagecreator-get_startofleadout The C++ syntax for retrieving the start of the leadout LBA. ```cpp HRESULT get_StartOfLeadout( [out] LONG *value ); ``` -------------------------------- ### get_StartingLba Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-irawcdimagetrackinfo-get_startinglba The method signature for retrieving the starting LBA of a CD track. ```cpp HRESULT get_StartingLba( [out] LONG *value ); ``` -------------------------------- ### IFileSystemImage::put_SessionStartBlock Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-put_sessionstartblock The C++ method signature for setting the session start block. ```cpp HRESULT put_SessionStartBlock( [in] LONG newVal ); ``` -------------------------------- ### IFileSystemImage::get_SessionStartBlock Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_sessionstartblock The method signature for retrieving the session start block in C++. ```cpp HRESULT get_SessionStartBlock( [out] LONG *pVal ); ``` -------------------------------- ### IMultisessionSequential::get_StartAddressOfPreviousSession Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-imultisessionsequential-get_startaddressofprevioussession The method signature for retrieving the start address of the previous session. ```cpp HRESULT get_StartAddressOfPreviousSession( LONG *value ); ``` -------------------------------- ### IFileSystemImage::get_SessionStartBlock Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_sessionstartblock Retrieves the starting block address for the recording session. ```APIDOC ## HRESULT get_SessionStartBlock(LONG *pVal) ### Description Retrieves the starting block address for the recording session. ### Parameters - **pVal** (LONG*) - Output - Starting block address for the recording session. ### Return Value - **S_OK**: Success - **E_POINTER**: Pointer is not valid (0x80004003) ``` -------------------------------- ### IFileSystemImage::put_SessionStartBlock Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-put_sessionstartblock Sets the starting block address for the recording session. ```APIDOC ## HRESULT put_SessionStartBlock(LONG newVal) ### Description Sets the starting block address for the recording session. Note that if the previous session is imported, the session start block cannot be changed manually. ### Parameters - **newVal** (LONG) - Required - The block number of the new recording session. ### Return Value - **S_OK** - Success - **Other HRESULT codes** - Implementation-specific success or error codes ``` -------------------------------- ### IMultisessionSequential::get_StartAddressOfPreviousSession Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-imultisessionsequential-get_startaddressofprevioussession Retrieves the starting sector address of the previous session on the media. ```APIDOC ## HRESULT get_StartAddressOfPreviousSession(LONG *value) ### Description Retrieves the first sector written in the previous session on the media. ### Parameters - **value** (LONG*) - Pointer to a variable that receives the sector number identifying the starting point of the previous write session. ### Return Value - **S_OK**: Success. - **E_POINTER**: The pointer is not valid. - **E_FAIL**: Unspecified failure. - **E_OUTOFMEMORY**: Failed to allocate required memory. - **E_INVALIDARG**: One or more arguments are not valid. - **E_IMAPI_RECORDER_COMMAND_TIMEOUT**: Device failed to accept command within timeout. - **E_IMAPI_RECORDER_INVALID_RESPONSE_FROM_DEVICE**: Device reported unexpected or invalid data. - **E_IMAPI_RECORDER_MEDIA_UPSIDE_DOWN**: Media is inserted upside down. - **E_IMAPI_RECORDER_MEDIA_BECOMING_READY**: Drive is in the process of becoming ready. - **E_IMAPI_RECORDER_MEDIA_NO_MEDIA**: No media in the device. - **E_IMAPI_RECORDER_MEDIA_FORMAT_IN_PROGRESS**: Media is currently being formatted. - **E_IMAPI_RECORDER_MEDIA_BUSY**: Drive is performing a long-running operation. - **E_IMAPI_LOSS_OF_STREAMING**: Write failed due to insufficient data streaming. - **E_IMAPI_RECORDER_MEDIA_INCOMPATIBLE**: Media is not compatible or of unknown format. - **E_IMAPI_RECORDER_DVD_STRUCTURE_NOT_PRESENT**: DVD structure is not present. - **E_IMAPI_RECORDER_NO_SUCH_MODE_PAGE**: Requested mode page is not present. - **E_IMAPI_RECORDER_INVALID_MODE_PARAMETERS**: Mode parameters are not supported. - **E_IMAPI_RECORDER_MEDIA_WRITE_PROTECTED**: Media is write protected. - **E_IMAPI_RECORDER_MEDIA_SPEED_MISMATCH**: Media speed is incompatible with the device. - **HRESULT_FROM_WIN32(ERROR_INVALID_HANDLE)**: Specified handle is invalid. - **HRESULT_FROM_WIN32(ERROR_DEV_NOT_EXIST)**: Device is no longer available. - **E_IMAPI_RECORDER_LOCKED**: Device is exclusively locked. - **E_IMAPI_DF2DATA_INVALID_MEDIA_STATE**: Operation is not valid with current media state. ``` -------------------------------- ### Syntax for put_StartingSectorsPerSecond Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iwriteengine2-put_startingsectorspersecond Defines the method signature for setting the starting sectors per second in C++. ```cpp HRESULT put_StartingSectorsPerSecond( [in] LONG value ); ``` -------------------------------- ### IBlockRange::get_StartLba Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iblockrange-get_startlba Retrieves the start sector of the range described by IBlockRange. ```APIDOC ## HRESULT get_StartLba(LONG *value) ### Description Retrieves the start sector of the range described by IBlockRange. ### Parameters - **value** (LONG*) - [out] The start sector of the range. ### Return Value - **S_OK**: Success. - **E_POINTER**: Invalid pointer. ``` -------------------------------- ### Syntax for get_StartingSectorsPerSecond Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iwriteengine2-get_startingsectorspersecond Retrieves the starting write speed in sectors per second. ```cpp HRESULT get_StartingSectorsPerSecond( [out] LONG *value ); ``` -------------------------------- ### IRawCDImageCreator::put_StartingTrackNumber Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-irawcdimagecreator-put_startingtracknumber The C++ method signature for setting the starting track number. ```cpp HRESULT put_StartingTrackNumber( [in] LONG value ); ``` -------------------------------- ### IDiscFormat2Data::get_StartAddressOfPreviousSession Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2data-get_startaddressofprevioussession The method signature for retrieving the start address of the previous session in C++. ```cpp HRESULT get_StartAddressOfPreviousSession( [out] LONG *value ); ``` -------------------------------- ### Verifying Buffer Alignment Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscrecorder2ex-getbytealignmentmask Example of using the retrieved mask to check if a data buffer address is correctly aligned. ```cpp if (0x3840958 & (value - 1) == 0) { // The alignment is correct } ``` -------------------------------- ### IDiscMaster2::get__NewEnum Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscmaster2-get__newenum Retrieves a list of the CD and DVD devices installed on the computer as an IEnumVARIANT interface. ```APIDOC ## HRESULT get__NewEnum(IEnumVARIANT **ppunk) ### Description Retrieves an IEnumVARIANT interface that allows the caller to enumerate the CD and DVD devices installed on the computer. The items returned are variants of type VT_BSTR, where the bstrVal member contains the unique device identifier. ### Parameters - **ppunk** (IEnumVARIANT**) - [out] A pointer to an IEnumVARIANT interface used to enumerate the installed CD and DVD devices. ### Return Value - **S_OK**: Returned when the operation is successful. - **E_POINTER**: Returned if the provided pointer is invalid (0x80004003). ``` -------------------------------- ### IDiscMaster2::get_Count Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscmaster2-get_count The method signature for retrieving the count of installed disc devices. ```cpp HRESULT get_Count( [out] LONG *value ); ``` -------------------------------- ### Retrieve the start LBA in C++ Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iblockrange-get_startlba Use this method to obtain the starting sector address from an IBlockRange interface pointer. ```cpp HRESULT get_StartLba( [out] LONG *value ); ``` -------------------------------- ### Re-enumerating Optical Drives Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscmaster2-get_item Demonstrates how to use get_Item and get_Count to list optical drives and handle configuration changes. ```C++ #include #include #include #include #include #pragma comment(lib, "ole32.lib") #pragma comment(lib, "user32.lib") int __cdecl _tmain(int argc, TCHAR* argv[]) { BSTR bstrDeviceName; HRESULT hr = S_OK; BOOL bComInitialised; IDiscMaster2* discMaster; UINT iCounter = 0; LONG lValue = 0; bComInitialised = SUCCEEDED(CoInitializeEx(0, COINIT_MULTITHREADED)); // Create an object of IDiscMaster2 if (SUCCEEDED(hr)){ CoCreateInstance( CLSID_MsftDiscMaster2, NULL, CLSCTX_ALL, IID_PPV_ARGS(&discMaster) ); if(FAILED(hr)){ _tprintf(TEXT("\nUnsuccessful in creating an instance of CLSID_MsftDiscMaster2.\n\nError returned: 0x%x\n"), hr); return 0; } } // // Loop twice and get the optical drives attached to the system, // first time just get the current configuration and second time // prompt the user to change the configuration and then get the // altered configuration. // do{ // Get the number of drives if (SUCCEEDED(hr)){ hr = discMaster->get_Count(&lValue); if (SUCCEEDED(hr)){ _tprintf(TEXT("\nTotal number of drives = %d\n"), lValue); } } // Print all the optical drives attached to the system if (SUCCEEDED(hr)){ for(LONG iCount = 0; iCount < lValue; iCount++) { hr = discMaster->get_Item(iCount, &bstrDeviceName); _tprintf(TEXT("\nUnique identifier of the disc device associated with index %d is: %s\n"), iCount, bstrDeviceName); } } // Prompt the user to unhook or add drives if (iCounter < 1){ MessageBox(NULL,TEXT("Please un-hook or add drives and hit OK"), TEXT("Manual Action"), MB_OK); _tprintf(TEXT("\nGetting the altered configuration ... \n")); } iCounter++; }while(iCounter < 2); discMaster->Release(); CoUninitialize(); bComInitialised = FALSE; return 0; ``` -------------------------------- ### Syntax for IFileSystemImage::put_BootImageOptions Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-put_bootimageoptions The method signature for setting boot image options in C++. ```cpp HRESULT put_BootImageOptions( [in] IBootOptions *newVal ); ``` -------------------------------- ### IBootOptions Interface Methods Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nn-imapi2fs-ibootoptions The IBootOptions interface provides methods to manage boot image properties for optical media. ```APIDOC ## IBootOptions Methods ### AssignBootImage Sets the data stream that contains the boot image. ### get_BootImage Retrieves a pointer to the boot image data stream. ### get_Emulation Retrieves the media type that the boot image is intended to emulate. ### get_ImageSize Retrieves the size of the boot image. ### get_Manufacturer Retrieves the identifier of the manufacturer of the CD. ### get_PlatformId Retrieves the platform identifier that identifies the operating system architecture that the boot image supports. ### put_Emulation Sets the media type that the boot image is intended to emulate. ### put_Manufacturer Sets an identifier that identifies the manufacturer or developer of the CD. ### put_PlatformId Sets the platform identifier that identifies the operating system architecture that the boot image supports. ``` -------------------------------- ### HRESULT get_BootImageOptions(IBootOptions **pVal) Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_bootimageoptions Retrieves the boot image that you want to add to the file system image. ```APIDOC ## HRESULT get_BootImageOptions(IBootOptions **pVal) ### Description Retrieves the boot image that you want to add to the file system image. ### Parameters - **pVal** (IBootOptions**) - Output - An IBootOptions interface of the boot image to add to the disc. Is NULL if a boot image has not been specified. ### Return Value - **S_OK**: Success - **E_POINTER**: Pointer is not valid (0x80004003) - **IMAPI_E_BOOT_OBJECT_CONFLICT**: A boot object can only be included in an initial disc image (0xC0AAB149) - **IMAPI_E_BOOT_IMAGE_DATA**: The boot object could not be added to the image (0xC0AAB148) ### Requirements - **Header**: imapi2fs.h - **Minimum supported client**: Windows Vista, Windows XP with SP2 - **Minimum supported server**: Windows Server 2003 ``` -------------------------------- ### IDiscMaster2::get_IsSupportedEnvironment Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscmaster2-get_issupportedenvironment The method signature for checking the optical device environment. ```C++ HRESULT get_IsSupportedEnvironment( VARIANT_BOOL *value ); ``` -------------------------------- ### IFileSystemImage::get_BootImageOptions Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_bootimageoptions The method signature for retrieving the boot image options in C++. ```cpp HRESULT get_BootImageOptions( [out] IBootOptions **pVal ); ``` -------------------------------- ### IDiscFormat2RawCD::get_LastPossibleStartOfLeadout Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2rawcd-get_lastpossiblestartofleadout Retrieves the last possible starting position for the leadout area. ```APIDOC ## HRESULT get_LastPossibleStartOfLeadout(LONG *value) ### Description Retrieves the last possible starting position for the leadout area. ### Parameters - **value** (LONG*) - Output - Sector address of the starting position for the leadout area. ### Return Value - **S_OK**: Success. - **E_POINTER**: Pointer is not valid. - **E_IMAPI_DF2RAW_MEDIA_IS_NOT_PREPARED**: The requested operation is only valid when media has been prepared. ``` -------------------------------- ### IBootOptions::get_Emulation Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ibootoptions-get_emulation Retrieves the media type that the boot image is intended to emulate. ```APIDOC ## HRESULT get_Emulation(EmulationType *pVal) ### Description Retrieves the media type that the boot image is intended to emulate. ### Parameters - **pVal** (EmulationType*) - Output - Pointer to a value that receives the media type that the boot image is intended to emulate. ### Return Value - **S_OK** - Success - **E_POINTER** - The pointer is not valid. ``` -------------------------------- ### IRawCDImageCreator::get_StartingTrackNumber Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-irawcdimagecreator-get_startingtracknumber Retrieves the starting track number for the raw CD image creator. ```APIDOC ## HRESULT get_StartingTrackNumber(LONG *value) ### Description Retrieves the starting track number. If this property holds a value other than 1, all tracks added to the image must be audio tracks. ### Parameters - **value** (LONG*) - Output - Pointer to a LONG value that represents the starting track number. ### Return Value - **S_OK** - Success - **Other success codes** - May be returned as a result of implementation. ``` -------------------------------- ### IBootOptions::put_Emulation Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ibootoptions-put_emulation Defines the method signature for setting the boot image emulation type in C++. ```cpp HRESULT put_Emulation( [in] EmulationType newVal ); ``` -------------------------------- ### IDiscFormat2RawCD::WriteMedia2 Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2rawcd-writemedia2 Writes raw CD data to the media starting at a specified time. ```APIDOC ## IDiscFormat2RawCD::WriteMedia2 ### Description This method writes raw CD data to the media. It is identical in function to the IDiscFormat2RawCD::WriteMedia method, except that it allows for a starting time other than 95:00:00. ### Requirements - **Header**: imapi2.h - **Minimum supported client**: Windows Vista, Windows XP with SP2 - **Minimum supported server**: Windows Server 2003 ``` -------------------------------- ### IFileSystemImage::put_FileSystemsToCreate Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-put_filesystemstocreate Defines the method signature for setting the file systems to create. ```C++ HRESULT put_FileSystemsToCreate( [in] FsiFileSystems newVal ); ``` -------------------------------- ### IFileSystemImage::CreateDirectoryItem Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-createdirectoryitem The method signature for creating a directory item in C++. ```C++ HRESULT CreateDirectoryItem( [in] BSTR name, [out] IFsiDirectoryItem **newItem ); ``` -------------------------------- ### InitializeDiscRecorder method syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscrecorder2-initializediscrecorder Defines the signature for initializing a disc recorder in C++. ```C++ HRESULT InitializeDiscRecorder( [in] BSTR recorderUniqueId ); ``` -------------------------------- ### IDiscMaster2::get_Count Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscmaster2-get_count Retrieves the number of CD and DVD disc devices installed on the computer. ```APIDOC ## IDiscMaster2::get_Count ### Description Retrieves the number of CD and DVD disc devices installed on the computer. ### Syntax `HRESULT get_Count([out] LONG *value);` ### Parameters - **value** (LONG*) - Output - Pointer to a variable that receives the number of CD and DVD disc devices installed on the computer. ### Return Value - **S_OK** - Success. - **E_POINTER** - The pointer is not valid. - **E_OUTOFMEMORY** - Failed to allocate the required memory. - **E_FAIL** - Unspecified failure. ``` -------------------------------- ### IFileSystemImage::put_WorkingDirectory Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-put_workingdirectory The method signature for setting the working directory in C++. ```cpp HRESULT put_WorkingDirectory( [in] BSTR newVal ); ``` -------------------------------- ### IWriteEngine2EventArgs::get_StartLba Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iwriteengine2eventargs-get_startlba Retrieves the starting logical block address (LBA) of the current write operation. ```APIDOC ## HRESULT get_StartLba(LONG *value) ### Description Retrieves the starting logical block address (LBA) of the current write operation. ### Parameters - **value** (LONG*) - [out] Starting logical block address of the write operation. Negative values for LBAs are supported. ### Return Value - **S_OK**: Success. - **E_POINTER**: Pointer is not valid (0x80004003). ``` -------------------------------- ### Syntax for put_ClientName Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2data-put_clientname The method signature for setting the client name in C++. ```cpp HRESULT put_ClientName( [in] BSTR value ); ``` -------------------------------- ### IBootOptions::put_Emulation Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ibootoptions-put_emulation Sets the media type that the boot image is intended to emulate. ```APIDOC ## HRESULT put_Emulation(EmulationType newVal) ### Description Sets the media type that the boot image is intended to emulate. The default value is EmulationNone, indicating the BIOS will not emulate any device type or special sector size. ### Parameters - **newVal** (EmulationType) - Required - The media type that the boot image is intended to emulate. Refer to the EmulationType enumeration for possible values. ### Return Value - **S_OK**: Success. - **IMAPI_E_BOOT_EMULATION_IMAGE_SIZE_MISMATCH (0xC0AAB14A)**: The emulation type requested does not match the boot image size. ``` -------------------------------- ### Retrieve supported file systems in C++ Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_filesystemssupported Use this method to determine which file system types are available for building an image. ```cpp HRESULT get_FileSystemsSupported( [out] FsiFileSystems *pVal ); ``` -------------------------------- ### IRawCDImageCreator::get_StartingTrackNumber syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-irawcdimagecreator-get_startingtracknumber Retrieves the starting track number via a pointer to a LONG value. ```cpp HRESULT get_StartingTrackNumber( [out] LONG *value ); ``` -------------------------------- ### ReleaseMedia method syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2rawcd-releasemedia The method signature for releasing a raw CD writing session. ```cpp HRESULT ReleaseMedia(); ``` -------------------------------- ### IFileSystemImage2::get_BootImageOptionsArray Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage2-get_bootimageoptionsarray The method signature for retrieving the boot image options array. ```cpp HRESULT get_BootImageOptionsArray( [out] SAFEARRAY **pVal ); ``` -------------------------------- ### IStreamPseudoRandomBased::put_ExtendedSeed Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-istreampseudorandombased-put_extendedseed Sets a list of seed values for the random number generator and seeks to the start of stream. ```APIDOC ## HRESULT put_ExtendedSeed(ULONG *values, ULONG eCount) ### Description Sets a list of seed values for the random number generator and seeks to the start of the stream. This method is used to provide a seed value greater than 32 bits. ### Parameters - **values** (ULONG*) - Required - Array of seed values used by the random number generator. - **eCount** (ULONG) - Required - Number of seed values in the values array. ### Return Value - **S_OK** - Success. - **E_NOTIMPL** - Not implemented. ``` -------------------------------- ### Syntax for get_FreeMediaBlocks Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_freemediablocks The method signature for retrieving the free media blocks in C++. ```cpp HRESULT get_FreeMediaBlocks( [out] LONG *pVal ); ``` -------------------------------- ### IStreamPseudoRandomBased::put_Seed Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-istreampseudorandombased-put_seed Sets the seed value used by the random number generator and seeks to the start of the stream. ```APIDOC ## HRESULT put_Seed(ULONG value) ### Description Sets the seed value used by the random number generator and seeks to the start of the stream. ### Parameters - **value** (ULONG) - Required - Seed value for the random number generator. ### Return Value - **S_OK** - Success. - **Other success codes** - May be returned as a result of implementation. ``` -------------------------------- ### IDiscFormat2RawCD::WriteMedia2 Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2rawcd-writemedia2 Writes a DAO-96 raw image to the blank media using a specified starting address. ```APIDOC ## HRESULT WriteMedia2(IStream *data, LONG streamLeadInSectors) ### Description Writes a DAO-96 raw image to the blank media using a specified starting address. ### Parameters - **data** (IStream*) - Required - An IStream interface of the data stream to write. - **streamLeadInSectors** (LONG) - Required - Starting address at which to begin writing the data stream. ``` -------------------------------- ### IFsiDirectoryItem::AddDirectory Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifsidirectoryitem-adddirectory The method signature for adding a directory to the file system image. ```C++ HRESULT AddDirectory( [in] BSTR path ); ``` -------------------------------- ### HRESULT ImportFileSystem(FsiFileSystems *importedFileSystem) Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-importfilesystem Imports the default file system on the current disc. The method selects the file system in the order of UDF, Joliet, then ISO 9660. ```APIDOC ## HRESULT ImportFileSystem(FsiFileSystems *importedFileSystem) ### Description Imports the default file system on the current disc into the in-memory file system structure. This method must be called after setting the MultisessionInterfaces property. ### Parameters - **importedFileSystem** (FsiFileSystems*) - Output - A pointer to a value that identifies the imported file system upon success. ### Return Value - **S_OK**: Success. - **E_POINTER**: The pointer is not valid. - **IMAPI_E_MULTISESSION_NOT_SET**: MultisessionInterfaces property was not set. - **IMAPI_E_EMPTY_DISC**: The optical media is empty. - **IMAPI_E_NO_SUPPORTED_FILE_SYSTEM**: No supported file system found on the disc. - **IMAPI_E_BOOT_OBJECT_CONFLICT**: Boot object conflict detected. - **E_OUTOFMEMORY**: Failed to allocate memory. - **IMAPI_E_IMAGE_TOO_BIG**: FreeMediaBlocks property value is too small. - **IMAPI_E_INVALID_PARAM**: An invalid parameter was provided. - **IMAPI_E_NO_COMPATIBLE_MULTISESSION_TYPE**: No compatible multisession type found or no media in device. - **IMAPI_E_INCOMPATIBLE_PREVIOUS_SESSION**: Incompatible layout of the previous session. ``` -------------------------------- ### IDiscFormat2RawCD::get_LastPossibleStartOfLeadout Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2rawcd-get_lastpossiblestartofleadout The method signature for retrieving the last possible start of the leadout area in C++. ```cpp HRESULT get_LastPossibleStartOfLeadout( [out] LONG *value ); ``` -------------------------------- ### Get Total System Buffer Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iwriteengine2eventargs-get_totalsystembuffer Retrieves the total size of the internal data buffer in bytes. ```cpp HRESULT get_TotalSystemBuffer( [out] LONG *value ); ``` -------------------------------- ### IFileSystemImage::CreateFileItem Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-createfileitem The method signature for creating a file item in C++. ```cpp HRESULT CreateFileItem( [in] BSTR name, [out] IFsiFileItem **newItem ); ``` -------------------------------- ### IFileSystemImage::get_WorkingDirectory Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_workingdirectory The method signature for retrieving the working directory path. ```cpp HRESULT get_WorkingDirectory( [out] BSTR *pVal ); ``` -------------------------------- ### IDiscFormat2RawCD::WriteMedia Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2rawcd-writemedia Writes a DAO-96 raw image to the blank media using MSF 95:00:00 as the starting address. ```APIDOC ## HRESULT WriteMedia(IStream *data) ### Description Writes a DAO-96 raw image to the blank media using MSF 95:00:00 as the starting address. ### Parameters - **data** (IStream*) - Required - An IStream interface of the data stream to write. ``` -------------------------------- ### Get Strict File System Compliance Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_strictfilesystemcompliance Retrieves the current compliance setting for the file system image. ```cpp HRESULT get_StrictFileSystemCompliance( [out] VARIANT_BOOL *pVal ); ``` -------------------------------- ### AssignBootImage Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ibootoptions-assignbootimage The method signature for assigning a boot image stream in C++. ```cpp HRESULT AssignBootImage( [in] IStream *newVal ); ``` -------------------------------- ### IRawCDImageCreator::get_StartOfLeadout Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-irawcdimagecreator-get_startofleadout Retrieves the LBA value for the start of the Leadout. This method requires that at least one track has been added to the image. ```APIDOC ## HRESULT get_StartOfLeadout(LONG *value) ### Description Retrieves the value that defines the LBA for the start of the Leadout. This method can be utilized to determine if the image can be written to a piece of media by comparing it against the LastPossibleStartOfLeadout for the media. ### Parameters - **value** (LONG*) - Output - Pointer to a LONG value that represents the LBA for the start of the Leadout. ### Return Value - **S_OK** - Success - **Other HRESULT codes** - Implementation-specific success or error codes ``` -------------------------------- ### IMultisession::get_IsSupportedOnCurrentMediaState Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-imultisession-get_issupportedoncurrentmediastate The method signature for checking multi-session support on the current media. ```C++ HRESULT get_IsSupportedOnCurrentMediaState( [out] VARIANT_BOOL *value ); ``` -------------------------------- ### IWriteEngine2::put_StartingSectorsPerSecond Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iwriteengine2-put_startingsectorspersecond Sets the estimated number of sectors per second that the recording device can write to the media at the start of the writing process. ```APIDOC ## HRESULT put_StartingSectorsPerSecond(LONG value) ### Description Sets the estimated number of sectors per second that the recording device can write to the media at the start of the writing process. This value is used to optimize sleep time in the write engine. ### Parameters - **value** (LONG) - Required - Approximate number of sectors per second. The default is -1 for maximum speed. ### Return Value - **S_OK**: Success - **E_FAIL**: Unspecified failure - **E_INVALIDARG**: One or more arguments are not valid ``` -------------------------------- ### GetDefaultFileSystemForImport Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-getdefaultfilesystemforimport The C++ method signature for retrieving the default file system for import. ```cpp HRESULT GetDefaultFileSystemForImport( [in] FsiFileSystems fileSystems, [out] FsiFileSystems *importDefault ); ``` -------------------------------- ### IWriteEngine2::get_StartingSectorsPerSecond Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iwriteengine2-get_startingsectorspersecond Retrieves the estimated number of sectors per second that the recording device can write to the media at the start of the writing process. ```APIDOC ## HRESULT get_StartingSectorsPerSecond(LONG *value) ### Description Retrieves the estimated number of sectors per second that the recording device can write to the media at the start of the writing process. ### Parameters - **value** (LONG*) - Output - Approximate number of sectors per second that the recording device can write to the media at the start of the writing process. A value of -1 indicates maximum speed. ### Return Value - **S_OK**: Success - **E_POINTER**: Pointer is not valid (0x80004003) ``` -------------------------------- ### IDiscFormat2RawCD::PrepareMedia Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2rawcd-preparemedia Prepares the media for a raw CD write operation. This method must be called after setting the client name and before starting the write process. ```APIDOC ## IDiscFormat2RawCD::PrepareMedia ### Description Prepares the media for a raw CD write operation. This method must be called before calling either the IDiscFormat2RawCD::WriteMedia or IDiscFormat2RawCD::WriteMedia2 methods. ### Requirements - **Header**: imapi2.h - **Minimum supported client**: Windows Vista, Windows XP with SP2 - **Minimum supported server**: Windows Server 2003 ``` -------------------------------- ### IDiscRecorder2::get_ProductRevision Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscrecorder2-get_productrevision The method signature for retrieving the product revision code. ```cpp HRESULT get_ProductRevision( [out] BSTR *value ); ``` -------------------------------- ### IRawCDImageCreator::put_StartingTrackNumber Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-irawcdimagecreator-put_startingtracknumber Sets the starting track number for the CD image. This property must be set before any tracks are added to the image. If the value is set to something other than 1, all subsequent tracks must be audio tracks. ```APIDOC ## HRESULT put_StartingTrackNumber(LONG value) ### Description Sets the starting track number for the CD image. This property can only be set before the addition of tracks. If this property is set to a value other than 1, all tracks added to the image must be audio tracks. ### Parameters - **value** (LONG) - Required - The starting track number to be set. ### Return Value - **S_OK** - Success. - **Other success codes** - May be returned as a result of implementation. ``` -------------------------------- ### ImportFileSystem method syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-importfilesystem Defines the signature for the ImportFileSystem method used to import file systems from optical media. ```C++ HRESULT ImportFileSystem( [out] FsiFileSystems *importedFileSystem ); ``` -------------------------------- ### IFileSystemImage Methods Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nn-imapi2fs-ifilesystemimage A collection of methods for configuring and managing file system images for optical media. ```APIDOC ## IFileSystemImage Methods - **ImportFileSystem**: Imports the default file system on the current disc. - **ImportSpecificFileSystem**: Import a specific file system from disc. - **LockInChangePoint**: Locks the file system information at the current change-point level. - **put_BootImageOptions**: Sets the boot image that you want to add to the file-system image. - **put_FileSystemsToCreate**: Sets the file systems to create when generating the result stream. - **put_FreeMediaBlocks**: Sets the maximum number of blocks available for the image. - **put_ISO9660InterchangeLevel**: Sets the ISO9660 compatibility level of the file system image. - **put_MultisessionInterfaces**: Sets the list of multi-session interfaces for the optical media. - **put_SessionStartBlock**: Sets the starting block address for the recording session. - **put_StageFiles**: Determines if the files being added to the file system image should be staged before the burn. - **put_StrictFileSystemCompliance**: Determines the compliance level for creating and developing the file-system image. - **put_UDFRevision**: Sets the UDF revision level of the file system image. - **put_UseRestrictedCharacterSet**: Determines if file and directory names should be restricted to using only CP_ANSI characters. - **put_VolumeName**: Sets the volume name for this file system image. - **put_WorkingDirectory**: Sets the temporary directory in which stash files are built. - **RollbackToChangePoint**: Reverts the image back to the specified change point. - **SetMaxMediaBlocksFromDevice**: Set maximum number of blocks available based on the capabilities of the recorder. ``` -------------------------------- ### IFsiDirectoryItem::AddFile Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifsidirectoryitem-addfile The method signature for adding a file to the file system image. ```cpp HRESULT AddFile( [in] BSTR path, [in] IStream *fileData ); ``` -------------------------------- ### Syntax for put_CreateRedundantUdfMetadataFiles Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage3-put_createredundantudfmetadatafiles The method signature for configuring UDF metadata redundancy. ```cpp HRESULT put_CreateRedundantUdfMetadataFiles( [in] VARIANT_BOOL newVal ); ``` -------------------------------- ### Retrieve boot image size in C++ Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ibootoptions-get_imagesize Use this method to obtain the size of the boot image in bytes. Ensure the pVal pointer is valid to avoid E_POINTER errors. ```cpp HRESULT get_ImageSize( [out] ULONG *pVal ); ``` -------------------------------- ### Syntax for put_FreeMediaBlocks Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-put_freemediablocks Defines the method signature for setting the free media blocks in the file system image. ```cpp HRESULT put_FreeMediaBlocks( [in] LONG newVal ); ``` -------------------------------- ### IDiscFormat2RawCD::PrepareMedia Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2rawcd-preparemedia The method signature for preparing media for raw CD writing. ```cpp HRESULT PrepareMedia(); ``` -------------------------------- ### IBootOptions::get_ImageSize Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ibootoptions-get_imagesize Retrieves the size of the boot image. ```APIDOC ## HRESULT get_ImageSize(ULONG *pVal) ### Description Retrieves the size of the boot image in bytes. ### Parameters - **pVal** (ULONG*) - Output - Pointer to a value that receives the size of the boot image in bytes. ### Return Value - **S_OK** - Success. - **E_POINTER** - The pointer provided is not valid (0x80004003). ``` -------------------------------- ### IDiscRecorder2::CloseTray Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscrecorder2-closetray The method signature for closing the media tray. ```C++ HRESULT CloseTray(); ``` -------------------------------- ### IDiscFormat2TrackAtOnce::PrepareMedia Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscformat2trackatonce-preparemedia Prepares the media for a track-at-once write operation. This method must be called before adding audio tracks to the disc. ```APIDOC ## HRESULT PrepareMedia() ### Description Prepares the media for writing audio tracks. This method must be called before calling the IDiscFormat2TrackAtOnce::AddAudioTrack method. ### Remarks - Before calling this method, you must call the IDiscFormat2TrackAtOnce::put_ClientName method. - After the write is complete or cancelled, you must call the IDiscFormat2TrackAtOnce::ReleaseMedia method to release the lock. - Media Change Notification (MCN) and the IDiscFormat2TrackAtOnce::put_DoNotFinalizeMedia property become read-only until the session is closed. ### Requirements - **Header**: imapi2.h - **Minimum supported client**: Windows Vista, Windows XP with SP2 - **Minimum supported server**: Windows Server 2003 ``` -------------------------------- ### GetSupportedProfiles Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscrecorder2ex-getsupportedprofiles Defines the method signature for retrieving device profiles in C++. ```cpp HRESULT GetSupportedProfiles( [in] BOOLEAN currentOnly, [out] IMAPI_PROFILE_TYPE **profileTypes, [out] ULONG_IMAPI2_ALL_PROFILES *validProfiles ); ``` -------------------------------- ### Syntax for get_CreateRedundantUdfMetadataFiles Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage3-get_createredundantudfmetadatafiles The method signature for retrieving the UDF metadata redundancy status. ```cpp HRESULT get_CreateRedundantUdfMetadataFiles( [out] VARIANT_BOOL *pVal ); ``` -------------------------------- ### IMultisessionSequential::get_FreeSectorsOnMedia Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-imultisessionsequential-get_freesectorsonmedia The method signature for retrieving free sectors on the media. ```C++ HRESULT get_FreeSectorsOnMedia( LONG *value ); ``` -------------------------------- ### IFsiDirectoryItem::get_Item Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifsidirectoryitem-get_item The method signature for retrieving an item from the file system image. ```cpp HRESULT get_Item( [in] BSTR path, [out] IFsiItem **item ); ``` -------------------------------- ### IFsiDirectoryItem::AddDirectory Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifsidirectoryitem-adddirectory Adds a directory to the file system image. ```APIDOC ## IFsiDirectoryItem::AddDirectory ### Description Adds a directory to the file system image. The parent directory for the new subdirectory must already exist within the file system image. ### Syntax `HRESULT AddDirectory([in] BSTR path);` ### Parameters - **path** (BSTR) - Required - String that contains the relative path of the directory to create. Specify the full path when calling this method from the root directory item. ### Return Value - **S_OK**: Success. - **IMAPI_E_INVALID_PATH** (0xC0AAB110): Path is badly formed or contains invalid characters. - **IMAPI_E_INVALID_PARAM** (0xC0AAB101): The value specified for the parameter is not valid. - **IMAPI_E_NOT_IN_FILE_SYSTEM** (0xC0AAB10B): The item is not part of the file system. - **IMAPI_E_READONLY** (0xC0AAB102): FileSystemImage object is in read-only mode. ``` -------------------------------- ### Syntax for get_ISO9660InterchangeLevelsSupported Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-get_iso9660interchangelevelssupported The method signature for retrieving supported ISO9660 interchange levels in C++. ```cpp HRESULT get_ISO9660InterchangeLevelsSupported( [out] SAFEARRAY **pVal ); ``` -------------------------------- ### IFileSystemImage::CreateDirectoryItem Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-createdirectoryitem Creates a directory item with the specified name. ```APIDOC ## HRESULT CreateDirectoryItem(BSTR name, IFsiDirectoryItem **newItem) ### Description Creates a directory item with the specified name. After setting properties on the returned IFsiDirectoryItem interface, call the IFsiDirectoryItem::Add method on the parent directory item to add it to the file system image. ### Parameters - **name** (BSTR) - [in] String that contains the name of the directory item to create. - **newItem** (IFsiDirectoryItem**) - [out] An IFsiDirectoryItem interface of the new directory item. When done, call the IFsiDirectoryItem::Release method to release the interface. ### Return Value - **S_OK**: Success. - **E_POINTER**: Pointer is not valid. - **IMAPI_E_INVALID_PARAM**: The value specified for parameter is not valid. - **E_OUTOFMEMORY**: Failed to allocate the required memory. ``` -------------------------------- ### ProbeSpecificFileSystem method syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage3-probespecificfilesystem Defines the signature for the ProbeSpecificFileSystem method in C++. ```cpp HRESULT ProbeSpecificFileSystem( [in] FsiFileSystems fileSystemToProbe, [out, ref, retval] VARIANT_BOOL *isAppendable ); ``` -------------------------------- ### IFsiDirectoryItem::Add method syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifsidirectoryitem-add The method takes an IFsiItem pointer representing the file or directory to be added to the image. ```C++ HRESULT Add( [in] IFsiItem *item ); ``` -------------------------------- ### EnableMcn method syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscrecorder2-enablemcn The method signature for enabling Media Change Notification on an IDiscRecorder2 object. ```cpp HRESULT EnableMcn(); ``` -------------------------------- ### Syntax for put_DigitalAudioCopySetting Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-irawcdimagetrackinfo-put_digitalaudiocopysetting The method signature for setting the digital audio copy property in C++. ```cpp HRESULT put_DigitalAudioCopySetting( [in] IMAPI_CD_TRACK_DIGITAL_COPY_SETTING value ); ``` -------------------------------- ### Syntax for get_FreeSystemBuffer Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-iwriteengine2eventargs-get_freesystembuffer The method signature for retrieving the free system buffer size in C++. ```cpp HRESULT get_FreeSystemBuffer( [out] LONG *value ); ``` -------------------------------- ### IDiscRecorder2::get_ProductId Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscrecorder2-get_productid The method signature for retrieving the product ID of a device. ```cpp HRESULT get_ProductId( [out] BSTR *value ); ``` -------------------------------- ### HRESULT get_Path(BSTR *pVal) Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-iisoimagemanager-get_path Retrieves the logical path to an .iso image. ```APIDOC ## HRESULT get_Path(BSTR *pVal) ### Description Retrieves the logical path to an .iso image. ### Syntax ```cpp HRESULT get_Path( [out] BSTR *pVal ); ``` ### Parameters - **pVal** (BSTR *) - Output - Pointer to the logical path to an .iso image (e.g., "c:\\path\\file.iso"). ### Requirements - **Header**: imapi2fs.h - **Minimum supported client**: Windows Vista, Windows XP with SP2 - **Minimum supported server**: Windows Server 2003 ``` -------------------------------- ### IDiscRecorder2::get_DeviceCanLoadMedia Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2/nf-imapi2-idiscrecorder2-get_devicecanloadmedia The method signature for checking if a device supports automatic media loading. ```cpp HRESULT get_DeviceCanLoadMedia( [out] VARIANT_BOOL *value ); ``` -------------------------------- ### Retrieve boot image emulation type in C++ Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ibootoptions-get_emulation Retrieves the media type for the boot image via the pVal pointer. ```cpp HRESULT get_Emulation( [out] EmulationType *pVal ); ``` -------------------------------- ### ImportSpecificFileSystem method syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifilesystemimage-importspecificfilesystem Defines the signature for the ImportSpecificFileSystem method in C++. ```cpp HRESULT ImportSpecificFileSystem( [in] FsiFileSystems fileSystemToUse ); ``` -------------------------------- ### IFsiItem::get_CreationTime Syntax Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ifsiitem-get_creationtime Retrieves the creation time of a file system item. ```cpp HRESULT get_CreationTime( [out] DATE *pVal ); ``` -------------------------------- ### HRESULT AssignBootImage(IStream *newVal) Source: https://learn.microsoft.com/en-us/windows/win32/api/imapi2fs/nf-imapi2fs-ibootoptions-assignbootimage Sets the data stream that contains the boot image for the IBootOptions object. ```APIDOC ## IBootOptions::AssignBootImage ### Description Sets the data stream that contains the boot image. If the size of the assigned boot image matches standard floppy sizes (1.2, 1.44, or 2.88 MB), the EmulationType is automatically adjusted. ### Syntax `HRESULT AssignBootImage(IStream *newVal);` ### Parameters - **newVal** (IStream*) - Required - An IStream interface of the data stream that contains the boot image. ### Return Value - **S_OK**: Success. - **E_POINTER**: Pointer is not valid. - **IMAPI_E_BOOT_IMAGE_DATA**: The boot object could not be added to the image. ```