Rocket Division Software
http://www.starburnsoftware.com/forum/

C++ sample inquiry
http://www.starburnsoftware.com/forum/starburn-sdk-f3/sample-inquiry-t88.html
Page 1 of 1

Author:  inamig [ Wed Aug 11, 2004 7:25 pm ]
Post subject:  C++ sample inquiry

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.

Author:  alexey (staff) [ Thu Aug 12, 2004 11:01 am ]
Post subject:  Sampes

Hello,

There are some samples like you described:
DVDVideoTrackAtOnceFromTree
TrackAtOnceFromTree
TrackAtOnceFromFile

Have a nice day,
Alexey

Author:  inamig [ Thu Aug 12, 2004 1:37 pm ]
Post subject:  C++ instead of C samples

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.

Author:  anton (staff) [ Thu Aug 12, 2004 8:50 pm ]
Post subject:  Re: C++ instead of C samples

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.

Author:  Vetch [ Thu Aug 12, 2004 10:41 pm ]
Post subject:  Re: C++ instead of C samples

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 ;-)

Author:  anton (staff) [ Thu Aug 12, 2004 11:57 pm ]
Post subject:  Re: C++ instead of C samples

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 ;-)

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/