StarBurn SDK (Software Development Kit) |
__stdcall STARBURN_IMPEX_API VOID StarBurn_ISO9660JolietFileTree_Cancel(IN PVOID p__PVOID__ISO9660JolietFileTree);
Parameters | Description |
IN PVOID p__PVOID__ISO9660JolietFileTree | Pointer to the ISO9660 or Joliet file tree object that toolkit allocated during call to StarBurn_ISO9660JolietFileTree_Create(). |
Nothing. This function cannot fail.
This function canceles ISO9660 or Joliet file tree creation process.
Can cancel only the process initiated by call to StarBurn_ISO9660Joliet_Add, StarBurn_ISO9660JolietFileTree_BuildImage, StarBurn_ISO9660JolietFileTree_Read and StarBurn_ISO9660JolietFileTree_SeekToBegin time-expensive actions cannot be canceled with this code. Also it must be noted that StarBurn_ISO9660JolietFileTree_Cancel is supposed to be executed from the different thread that the one that calls StarBurn_ISO9660JolietFileTree_Add (original thread will be blocked processing it's call).
This example allocates Joliet file tree, initiates tree creation, cancels it and destroys it (tree) after it's not needed any more.
// Somewhere in the data region PVOID l__PVOID__FileTree; EXCEPTION_NUMBER l__EXCEPTION_NUMBER; ULONG l__ULONG__TreeNodes; ULONG l__ULONG__SystemError; CHAR l__CHAR__ExceptionText[ 1024 ]; // Prepare exception text buffer RtlZeroMemory( &l__CHAR__ExceptionText, sizeof( l__CHAR__ExceptionText ) ); // Try to create Joliet file tree l__EXCEPTION_NUMBER = StarBurn_ISO9660JolietFileTree_Create( &l__PVOID__FileTree, ( PCHAR )( &l__CHAR__ExceptionText ), sizeof( l__CHAR__ExceptionText ), &l__ULONG__Status, ( PCALLBACK )( StarBurn_Callback ), ( PVOID )( &l__LONG__TreeNodes ), TRUE, FALSE, FILE_TREE_JOLIET ); // Check for correct reply if ( l__EXCEPTION_NUMBER != EN_SUCCESS ) { // Handle error here... } // Add directories or files with the help of the StarBurn_ISO9660JolietFileTree_Add here... // Cancel tree creation process. Keep in mind that this code must be called from the different thread StarBurn_ISO9660JolietFileTree_Cancel( l__PVOID__FileTree ); // Destroy the Joliet file tree StarBurn_Destroy( &l__PVOID__FileTree ); // Just check for pointer (paranoid?) if ( l__PVOID__FileTree != NULL ) { // Handle error here... }