#1 Burning Software

It is currently Wed Apr 24, 2024 4:02 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: C++ sample inquiry
PostPosted: Wed Aug 11, 2004 7:25 pm 
Offline

Joined: Wed Aug 11, 2004 7:19 pm
Posts: 2
I read that you have C++ samples (or working on it). I would like to see two samples which would cover writing a single file and a single folder to either CD (any format) or DVD (any format).

So, something like this:

1) Check to see if CD or DVD burner is present
2) Check to see if CD or DVD (blank disk) is in
3) Write one file or one folder
4) Finalize disk (if it is a separate call)
5) Notify user that it is ready, open tray
6) Any necessary clean up

VC++ sample would be great. (no .NET please)
Most apps need backup capabilities, this would help many of your users.


Top
 Profile  
 
 Post subject: Sampes
PostPosted: Thu Aug 12, 2004 11:01 am 
Offline

Joined: Mon May 31, 2004 6:22 am
Posts: 134
Hello,

There are some samples like you described:
DVDVideoTrackAtOnceFromTree
TrackAtOnceFromTree
TrackAtOnceFromFile

Have a nice day,
Alexey


Top
 Profile  
 
 Post subject: C++ instead of C samples
PostPosted: Thu Aug 12, 2004 1:37 pm 
Offline

Joined: Wed Aug 11, 2004 7:19 pm
Posts: 2
Yes, there are C samples, but most developers today do not use C.
C++ samples will be a lot more helpful.

Look at this from the other side. If you make it easier to use, more people
will buy it from you.


Top
 Profile  
 
 Post subject: Re: C++ instead of C samples
PostPosted: Thu Aug 12, 2004 8:50 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
We don't have C++ samples as we have C-style API. Some day we'll have C++ wrappers created for StarBurn SDK. Maybe. But this day will be neither tomorrow nor the day after tomorrow. You'll have to live with this :)

inamig wrote:
Yes, there are C samples, but most developers today do not use C.
C++ samples will be a lot more helpful.

Look at this from the other side. If you make it easier to use, more people
will buy it from you.


Top
 Profile  
 
 Post subject: Re: C++ instead of C samples
PostPosted: Thu Aug 12, 2004 10:41 pm 
Offline

Joined: Wed Jul 21, 2004 7:03 am
Posts: 19
Location: Poland
anton (staff) wrote:
We don't have C++ samples as we have C-style API. Some day we'll have C++ wrappers created for StarBurn SDK. Maybe. But this day will be neither tomorrow nor the day after tomorrow. You'll have to live with this :)


Ok, i can live with anything :-) But example sources are very hard to read and understand for me. Simply watch examples:

How it looks now:

Code:
        //
        // If it is a name collision callback
        //
        case CN_FILE_TREE_PROGRESS_NAME_COLLISION:
        {
            l__PNAME_COLLISION_INFO = ( PNAME_COLLISION_INFO )p__PVOID__CallbackSpecial1;
            //
            // Show common information
            //
            printf(
                "TrackAtOnceFromTreeWithImport:Callback(): Name collision for "
                );
            //
            // Show the name
            //
            if (l__PNAME_COLLISION_INFO->m__BOOLEAN__IsJolietName == FALSE)
            {
                printf(                 
                    "ISO9660 : <%s> -> " ,
                    (PCHAR)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]
                    );
               
                CorrectISO9660Name((PCHAR)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]);

                printf(                 
                    "<%s>\n" ,
                    (PCHAR)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]
                    );

            }
            else
            {
                printf(                 
                    "Joliet : <%S> -> " ,
                    (USHORT *)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]
                    );

                CorrectJolietName((USHORT *)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]);

                printf(                 
                    "<%S>\n" ,
                    (USHORT *)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]
                    );
            }

            //
            // Set the our solution
            //
            l__PNAME_COLLISION_INFO->m__NAME_COLLISION_SOLUTION =
               NAME_COLLISION_RENAME_NEW;
               //NAME_COLLISION_SKIP_NEW;
               //NAME_COLLISION_REPLACE_OLD;
        }
        break;


And how it looks when i'm starting to learn, after my small update :-):

Code:
   // If it is a name collision callback
   case CN_FILE_TREE_PROGRESS_NAME_COLLISION:
   {
      pNameCollisionInfo = (PNAME_COLLISION_INFO)pCBSpecial1;
      // Show common information
      printf("TrackAtOnceFromTreeWithImport:Callback(): Name collision for ");
      // Show the name
      if (pNameCollisionInfo->bIsJolietName == FALSE)
      {
         printf("ISO9660 : <%s> -> ", (PCHAR)&pNameCollisionInfo->m__UCHAR__Name[0]);        
         CorrectISO9660Name((PCHAR)&pNameCollisionInfo->m__UCHAR__Name[0]);
         printf("<%s>\n", (PCHAR)&pNameCollisionInfo->m__UCHAR__Name[0]);
      } else {
         printf("Joliet : <%S> -> ", (USHORT*)&pNameCollisionInfo->m__UCHAR__Name[0]);
         CorrectJolietName((USHORT *)&pNameCollisionInfo->m__UCHAR__Name[0]);
         printf("<%S>\n", (USHORT*)&pNameCollisionInfo->m__UCHAR__Name[0]);
      }
      // Set the our solution
      pNameCollisionInfo->m__NAME_COLLISION_SOLUTION = NAME_COLLISION_RENAME_NEW;
   }
   break;



Details:
- short, clear variable names
- tabs 2 chars width
- short comments
- starting { and closing } range should be visible on monitor. Not only 22" model :-)

Remember, we love short code - even if it only looks short :-)
Because, short code means short work ;-)


Top
 Profile  
 
 Post subject: Re: C++ instead of C samples
PostPosted: Thu Aug 12, 2004 11:57 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Well... StarBurn was originally created for my own needs and by myself. Thus coded in the way I like (naming conventions, formatting and 24" LCD formatting :). It should change one day (I mean the way samples are formatted). But as in case with C++ -- not tomorrow :)

Vetch wrote:
anton (staff) wrote:
We don't have C++ samples as we have C-style API. Some day we'll have C++ wrappers created for StarBurn SDK. Maybe. But this day will be neither tomorrow nor the day after tomorrow. You'll have to live with this :)


Ok, i can live with anything :-) But example sources are very hard to read and understand for me. Simply watch examples:

How it looks now:

Code:
        //
        // If it is a name collision callback
        //
        case CN_FILE_TREE_PROGRESS_NAME_COLLISION:
        {
            l__PNAME_COLLISION_INFO = ( PNAME_COLLISION_INFO )p__PVOID__CallbackSpecial1;
            //
            // Show common information
            //
            printf(
                "TrackAtOnceFromTreeWithImport:Callback(): Name collision for "
                );
            //
            // Show the name
            //
            if (l__PNAME_COLLISION_INFO->m__BOOLEAN__IsJolietName == FALSE)
            {
                printf(                 
                    "ISO9660 : <%s> -> " ,
                    (PCHAR)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]
                    );
               
                CorrectISO9660Name((PCHAR)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]);

                printf(                 
                    "<%s>\n" ,
                    (PCHAR)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]
                    );

            }
            else
            {
                printf(                 
                    "Joliet : <%S> -> " ,
                    (USHORT *)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]
                    );

                CorrectJolietName((USHORT *)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]);

                printf(                 
                    "<%S>\n" ,
                    (USHORT *)&l__PNAME_COLLISION_INFO->m__UCHAR__Name[0]
                    );
            }

            //
            // Set the our solution
            //
            l__PNAME_COLLISION_INFO->m__NAME_COLLISION_SOLUTION =
               NAME_COLLISION_RENAME_NEW;
               //NAME_COLLISION_SKIP_NEW;
               //NAME_COLLISION_REPLACE_OLD;
        }
        break;


And how it looks when i'm starting to learn, after my small update :-):

Code:
   // If it is a name collision callback
   case CN_FILE_TREE_PROGRESS_NAME_COLLISION:
   {
      pNameCollisionInfo = (PNAME_COLLISION_INFO)pCBSpecial1;
      // Show common information
      printf("TrackAtOnceFromTreeWithImport:Callback(): Name collision for ");
      // Show the name
      if (pNameCollisionInfo->bIsJolietName == FALSE)
      {
         printf("ISO9660 : <%s> -> ", (PCHAR)&pNameCollisionInfo->m__UCHAR__Name[0]);        
         CorrectISO9660Name((PCHAR)&pNameCollisionInfo->m__UCHAR__Name[0]);
         printf("<%s>\n", (PCHAR)&pNameCollisionInfo->m__UCHAR__Name[0]);
      } else {
         printf("Joliet : <%S> -> ", (USHORT*)&pNameCollisionInfo->m__UCHAR__Name[0]);
         CorrectJolietName((USHORT *)&pNameCollisionInfo->m__UCHAR__Name[0]);
         printf("<%S>\n", (USHORT*)&pNameCollisionInfo->m__UCHAR__Name[0]);
      }
      // Set the our solution
      pNameCollisionInfo->m__NAME_COLLISION_SOLUTION = NAME_COLLISION_RENAME_NEW;
   }
   break;



Details:
- short, clear variable names
- tabs 2 chars width
- short comments
- starting { and closing } range should be visible on monitor. Not only 22" model :-)

Remember, we love short code - even if it only looks short :-)
Because, short code means short work ;-)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group