I made some progress and got the structure declared. Now I'm getting an error when I call the StarBurn DAO routine.
Private Declare Ansi Function StarBurn_CdvdBurnerGrabber_DiscAtOncePQFromFile Lib "StarBurn.dll" (ByVal CdvdBurnerGrabber As Integer, ByVal pExceptionText As IntPtr, _
ByVal ExceptionTextSize As Integer, ByRef SystemError As Integer, _
ByRef PCDB_Fail_Info As CDB_Failure_Type, _
ByRef Dao_Layout As DAO_Disk_Layout, _
ByVal IsXA As Byte, ByVal IsTestRight As Byte, ByVal IsNextSessionAllowed As Byte, _
ByVal IsSubChannelRepairRequired As Byte, ByVal WriteReportDelayInSeconds As Integer, _
ByVal BufferReportDelayInSeconds As Integer) As Integer
Here is the structure as they are declared now:
<StructLayout(LayoutKind.Sequential, pack:=1)> Private Structure DAO_Disk_Layout_Entry
Public TrackSizeInLBAs As Integer
Public TrackStartInLBA As Integer
Public TrackName As String
Public FilePointer As Integer
Public IsDataTrack As Byte
Public IsRawTrack As Byte
Public Sub New(ByVal TrackName As String)
Me.TrackSizeInLBAs = 0
Me.TrackStartInLBA = 0
Me.TrackName = TrackName
Me.FilePointer = 0
Me.IsDataTrack = 0
Me.IsRawTrack = 0
End Sub
End Structure
<StructLayout(LayoutKind.Sequential, pack:=1)> Private Structure DAO_Disk_Layout
Public NumberOfEntries As Integer
Public DAO_Entries() As DAO_Disk_Layout_Entry
End Structure
When I set up the structure with my track names I use this.
Public Sub AddDAOTrack(ByVal TrackName As String)
Dim Mystruc As DAO_Disk_Layout_Entry
If DAOLayout.NumberOfEntries = 0 Then
ReDim DAOLayout.DAO_Entries(Number_of_Tracks)
End If
Mystruc = New DAO_Disk_Layout_Entry(TrackName)
DAOLayout.DAO_Entries(DAOLayout.NumberOfEntries) = Mystruc
DAOLayout.NumberOfEntries = DAOLayout.NumberOfEntries + 1
End Sub
Public Sub BurnDAO()
Dim ret As Integer
ret = StarBurn_CdvdBurnerGrabber_DiscAtOncePQFromFile(0, pExceptionText, ExceptionTextSize, SystemError, _
PCDB_Failure_Information, DAOLayout, 0, 0, 0, 0, 0, 0)
End Sub
|