StarBurn SDK (Software Development Kit)
ContentsIndexHome
PreviousUpNext
StarBurn_Destroy Function
C++
__stdcall STARBURN_IMPEX_API VOID StarBurn_Destroy(IN OUT PVOID * p__PPVOID__StarBurnObject);
Parameters 
Description 
IN OUT PVOID * p__PPVOID__StarBurnObject 
Pointer to pointer to the object that toolkit allocated before. 

None.

This function frees allocated memory in the way of destroying the object that toolkit created internally. This is universal call, it frees all the objects and does not care about object type.

This call does not check for passed parameter validness. It's up to user to provide the toolkit with correct pointers to objects. After return from this call the object pointer will be NULL.

This example allocates Joliet file tree and destroys it 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 )( Callback ),
    ( PVOID )( &l__LONG__TreeNodes ),
    TRUE,
    FALSE,
    TRUE,
    FILE_TREE_JOLIET
    );

// Check for correct reply
if (  l__EXCEPTION_NUMBER != EN_SUCCESS )
{
// Handle error here...
}

// Perform actions with Joliet tree here...

// Destroy the Joliet file tree
StarBurn_Destroy( &l__PVOID__FileTree );

// Just check for pointer (paranoid?)
if ( l__PVOID__FileTree != NULL )
{
// Handle error here...
}