andrey(staff) wrote:
Can you send to me your source code (or part of source code), and i'll try to solve problem.
Yes I can.
For example I've created source code shows this problem. Can I post code here?
Code:
PVOID ISOImage = NULL;
EXCEPTION_NUMBER Result = EN_SUCCESS;
ULONG Status = NO_ERROR;
CHAR ExceptionText[1024];
CDB_FAILURE_INFORMATION FailureInformation;
VOID PrintResult(const EXCEPTION_NUMBER result);
VOID CALLBACK ISOImageCallback(CALLBACK_NUMBER eCallbackNumber,
PVOID pCallbackContext,
PVOID pCallbackSpecial1,
PVOID pCallbackSpecial2);
int main(void)
{
std::cout << "Try to init StarBurn..." << std::endl;
Result = StarBurn_UpStartEx( g__UCHAR__RegistrationKey, sizeof(g__UCHAR__RegistrationKey));
PrintResult(Result);
std::cout << "Try to create ISO image object..." << std::endl;
Result = StarBurn_ISO9660JolietFileTree_Create(
&ISOImage,
ExceptionText,
sizeof(ExceptionText),
&Status,
(PCALLBACK)ISOImageCallback,
NULL,
FALSE,
FALSE,
TRUE,
FILE_TREE_JOLIET);
PrintResult(Result);
PVOID pRootNode = NULL;
PVOID pNewNode = NULL;
std::cout << "Try to create ISO image object..." << std::endl;
StarBurn_ISO9660JolietFileTree_GetRoot(ISOImage);
if (NULL != pRootNode)
{
PrintResult(EN_SUCCESS);
}
else
{
PrintResult(EN_FAILURE);
}
TCHAR strExistingFile[MAX_PATH];
TCHAR strTargetFile[MAX_PATH];
TCHAR strAbs[MAX_PATH];
TCHAR strLong[MAX_PATH];
TCHAR strShort[MAX_PATH];
memset(strExistingFile,0,sizeof(strExistingFile));
memset(strTargetFile,0,sizeof(strTargetFile));
memset(strAbs,0,sizeof(strAbs));
memset(strLong,0,sizeof(strLong));
memset(strShort,0,sizeof(strShort));
wcscpy(strExistingFile,_T("FILE.jpg"));
wcscpy(strTargetFile,_T("NEW_FILE.jpg"));
std::cout << "Try add file to an ISO image" << std::endl;
Result = StarBurn_ISO9660JolietFileTree_AddW(
ISOImage,
(PCHAR)&ExceptionText,
sizeof(ExceptionText),
&Status,
(TCHAR*)&strExistingFile,
(TCHAR*)&strTargetFile,
FILE_TIME_LAST_WRITE,
&pRootNode,
&pNewNode);
PrintResult(Result);
std::cout << "Try get names for created node..." << std::endl;
if (NULL != pNewNode)
{
StarBurn_ISO9660JolietFileTree_GetNamesW(
ISOImage,
pNewNode,
strAbs,
strLong,
strShort);
PrintResult(EN_SUCCESS);
}
else
{
PrintResult(EN_FAILURE);
}
std::cout << "Try delete ISO image object..." << std::endl;
StarBurn_Destroy(&ISOImage);
PrintResult(EN_SUCCESS);
std::cout << "Try to deinit StarBurn..." << std::endl;
Result = StarBurn_DownShut();
PrintResult(Result);
return Result;
}
VOID CALLBACK ISOImageCallback(CALLBACK_NUMBER eCallbackNumber,
PVOID pCallbackContext,
PVOID pCallbackSpecial1,
PVOID pCallbackSpecial2)
{
}
VOID PrintResult(const EXCEPTION_NUMBER result)
{
if (EN_SUCCESS == result)
{
std::cout << "Done." << std::endl;
}
else
{
std::cout << "Error!" << std::endl;
}
}
All strAbs, strLong and strShort variables are equals to "FILE.jpg"