Thanks Alex, it worked great.
For reference, here are the declarations I used:
Code:
[DllImport("StarBurn.dll", CharSet = CharSet.Ansi)]
private static extern EXCEPTION_NUMBER StarBurn_CdvdBurnerGrabber_DiscAtOnceRawPWFromFile(int CdvdBurnerGrabber, StringBuilder pExceptionText,
int ExceptionTextSize, ref int SystemError, ref CDB_FAILURE_INFORMATION PCDB_Failure_Information, ref DAO_DISC_LAYOUT PDAO_DISC_LAYOUT, bool IsXA,
bool IsTestWrite, bool IsNextSessionAllowed, bool IsSubChannelRepairRequired, int WriteReportDelayInSeconds, int BufferStatusReportDelayInSeconds);
[DllImport("StarBurn.dll", CharSet = CharSet.Ansi)]
private static extern EXCEPTION_NUMBER StarBurn_CdvdBurnerGrabber_DiscAtOncePQFromFile(int CdvdBurnerGrabber, StringBuilder pExceptionText,
int ExceptionTextSize, ref int SystemError, ref CDB_FAILURE_INFORMATION PCDB_Failure_Information, ref DAO_DISC_LAYOUT PDAO_DISC_LAYOUT, bool IsXA,
bool IsTestWrite, bool IsNextSessionAllowed, bool IsSubChannelRepairRequired, int WriteReportDelayInSeconds, int BufferStatusReportDelayInSeconds);
[StructLayout(LayoutKind.Sequential, Pack = 1)]
private struct DAO_DISC_LAYOUT
{
public int NumberOfEntries;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.AsAny)]
public DAO_DISC_LAYOUT_ENTRY[] PDAO_DISC_LAYOUT_ENTRY;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
private struct DAO_DISC_LAYOUT_ENTRY
{
public int TrackSizeInLBs;
public int TrackStartingLBA;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public String TrackName;
public UInt32 File;
public byte IsDataTrack;
public byte IsRawTrack;
public byte IsAudioTrack;
}