Hi all,
I am asking help :p
I have some problems using StarBurn_ISO9660JolietFileTree_Add function.
Here is my code :
Code:
void createImageFromDirectory()
{
EXCEPTION_NUMBER numException = EN_SUCCESS;
PVOID pFileTree = NULL;
char exceptionText[1024];
ULONG nStatus = ERROR_GEN_FAILURE;
LONG nTreeNodes = 0;
PVOID root = NULL;
PVOID newNode = NULL;
// on commence par créer la structure d'arbre
numException =
StarBurn_ISO9660JolietFileTree_Create(
&pFileTree,
( PCHAR )( &exceptionText ),
sizeof( exceptionText ),
&nStatus,
NULL,
( PVOID )( &nTreeNodes ),
TRUE,
FALSE, // No locked files - do not keep all the handles opened all the time
TRUE, // Use Level2 for ISO9660 names generation
FILE_TREE_ISO9660
);
// Try to get root here
root = StarBurn_ISO9660JolietFileTree_GetRoot(pFileTree);
numException =
StarBurn_ISO9660JolietFileTree_Add(
pFileTree,
( PCHAR )( &exceptionText ),
sizeof( exceptionText ),
&nStatus,
"C:\\test\\toto.gif",
NULL,
FILE_TIME_LAST_WRITE,
&root,
&newNode
);
}
The Create function run good and numException is good.
each time I execute it, I have an access violation "Access violation reading location 0x00000000" on Add function.
I don't understand what is happening. It seems to be good comparing to BuildImage example (which has no problem to execute)
C:\\test\\toto.gif is a correct file which exists
If I execute it with file which does not exist it does not raise Access Violation but exceptionText says "0x0012fa74 "CStarBurn_FileTree::CreateFromRoot(): FindFirstFile( 'C:\test12\toto.gif\*.*' ) failed, status 3!!!"
I have also tested with "C:\\test" folder which exists and it fails with access violation
Finally I tested
NULL, (arg5)
"RootFolder", (arg6)
and Access violation again
It would be nice to have help :p
Thank you very much