#1 Burning Software

It is currently Fri Mar 29, 2024 2:26 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: C# wrapper crashes upgrading to 7.1.10
PostPosted: Mon Apr 02, 2007 3:11 pm 
Offline

Joined: Thu Jan 25, 2007 11:16 pm
Posts: 44
hi!
I developed a c# wrapper for starburn api that work quite well with version 6.6.30, but crashes randomly with 7.1.10. The api and the various structures don't seem to have changed from 6.6.30.
What could it be?

thanks,
Massimo


Top
 Profile  
 
 Post subject: Re: C# wrapper crashes upgrading to 7.1.10
PostPosted: Mon Apr 02, 2007 4:24 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
I think you've originally had some bugs inside your code... With 7.1.10 (and 7.2.20 we've just released) we've used newer version of WDK to build the code. So environment, libraries etc changed. This could be a reason.

In any case you can send us your application (better in source of course) and we'll be happy to take a look at it.

Thanks!

mbat wrote:
hi!
I developed a c# wrapper for starburn api that work quite well with version 6.6.30, but crashes randomly with 7.1.10. The api and the various structures don't seem to have changed from 6.6.30.
What could it be?

thanks,
Massimo


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 7:19 am 
Offline

Joined: Thu Jan 25, 2007 11:16 pm
Posts: 44
Upgraded to 7.2.20. After more accurate analisys, the problem seems related to this call:

Code:
[DllImport("StarBurn.dll", CharSet = CharSet.Ansi)]
public static extern EXCEPTION_NUMBER
StarBurn_CdvdBurnerGrabber_GetTOCInformation(int
  CdvdBurnerGrabber, StringBuilder pExceptionText,
  int ExceptionTextSize, ref int SystemError,
  ref CDB_FAILURE_INFORMATION PCDB_FAILURE_INFORMATION,
  ref TOC_INFORMATION PTOC_INFORMATION);


I suppose TOC_INFORMATION is the key.
My TOC_INFORMATION declaration is:

Code:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct TOC_INFORMATION
    {
        public Byte IsValid;
        public Byte IsDVD;
        public UInt16 ProtectedDVDRegions;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst=5, ArraySubType=UnmanagedType.AsAny)]
        public Byte[] BusKeyForDiscKey;
        public Byte NumberOfSessions;
        public Byte NumberOfTracks;
        public Byte NumberOfUnsortedEntries;

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3400, ArraySubType = UnmanagedType.AsAny)]
        public Byte[] my_TOC_ENTRY; //TOC_ENTRY
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1100, ArraySubType = UnmanagedType.AsAny)]
        public Byte[] my_FULL_TOC_ENTRY_RAW; //FULL_TOC_ENTRY_RAW
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1100, ArraySubType = UnmanagedType.AsAny)]
        public Byte[] my_FULL_TOC_ENTRY_RAW__Unsorted; //FULL_TOC_ENTRY_RAW
    }


[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct TOC_ENTRY
    {
        public Byte IsValid;
        public Byte TrackNumber;
        public Byte SessionNumber;
        public Int32 StartingLBA;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.AsAny)]
        public Byte[] StartingMSF;
        public Int32 EndingLBA;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.AsAny)]
        public Byte[] EndingMSF;
        public Byte IsMCNAvailable;
        public Byte IsISRCAvailable;
        public Byte IsFourChannelsAudio;
        public Byte IsPreEmphasisAudio;
        public Byte IsData;
        public Byte IsAudio;
        public Byte IsDigitalCopyProhibited;
        public Byte TrackMode;
        public Byte MODE2Form;
        public UInt32 LBSizeInBytes;
        public Int32 Index00;
    }


[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct FULL_TOC_ENTRY_RAW
    {
        public Byte SessionNumber;
        public Byte CONTROL_ADR; // :4, :4
        public Byte TNO;
        public Byte POINT;
        public Byte Min;
        public Byte Sec;
        public Byte Frame;
        public Byte Zero;
        public Byte PMIN;
        public Byte PSEC;
        public Byte PFRAME;
    }



thanks a lot for support :D
Massimo


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 7:33 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Massimo,

sizeof( TOC ) changed after 6.6.30 (b/c we had to support more tracks, old format was not working for very large number of sessions + reserved and system tracks). Please synchronize your declaration with the one from StarBurn.h.

We're really sorry but there was no way to keep it AS IS and backward compatible. For most of the people (who did re-built of their projects with the upgrade) it worked, but not for you... Sorry again!

Thank you!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 8:14 am 
Offline

Joined: Thu Jan 25, 2007 11:16 pm
Posts: 44
Solved!
The problem was the following:
v6.6.30 - NUMBER_OF_TRACKS = NUMBER_OF_RAW_TRACKS = 100
v7.2.20 - NUMBER_OF_TRACKS = NUMBER_OF_RAW_TRACKS * 4 + 1

In the C# declaration, the last filed of TOC_INFORMATION must change the 'SizeConst' parameter from 11*100=1100 to 11*(100*4+1) = 4411

thanks for quick answers!

Massimo.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 8:24 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Nice to know everything is fine now :)

mbat wrote:
Solved!
The problem was the following:
v6.6.30 - NUMBER_OF_TRACKS = NUMBER_OF_RAW_TRACKS = 100
v7.2.20 - NUMBER_OF_TRACKS = NUMBER_OF_RAW_TRACKS * 4 + 1

In the C# declaration, the last filed of TOC_INFORMATION must change the 'SizeConst' parameter from 11*100=1100 to 11*(100*4+1) = 4411

thanks for quick answers!

Massimo.


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 25 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