Below is some of the C header code for a function I am trying to convert to work in PB. The issue, I believe, is in the DAO_DISC_LAYOUT_ENTRY specifically the __CHAR__TrackName member of the struct. I’ve tried several different ideas but haven't had success. Anyone have any ideas?
Specific questions:
How would one create the DAO_DISC_LAYOUT and ENTRY datatypes?
How would the DECLARE for the DAO_DISC_LAYOUT parameter be passed in the function StarBurn_CdvdBurnerGrabber_DiscAtOnceRawPWFromFileAudioUnicode?
The structure DAO_DISC_LAYOUT contains a dynamic array of entries. How would one do this in PB? Should I just create an area of memory with GLOBALMEM (PB 9 feature) and fill it in the manner required?
Thanks,
Brian
C Structures
C Function Call
Specific questions:
How would one create the DAO_DISC_LAYOUT and ENTRY datatypes?
How would the DECLARE for the DAO_DISC_LAYOUT parameter be passed in the function StarBurn_CdvdBurnerGrabber_DiscAtOnceRawPWFromFileAudioUnicode?
The structure DAO_DISC_LAYOUT contains a dynamic array of entries. How would one do this in PB? Should I just create an area of memory with GLOBALMEM (PB 9 feature) and fill it in the manner required?
Thanks,
Brian
C Structures
Code:
// // Structure that represents DAO disc layout entry (track) // // <TABLE> // Member Definition // ---------- --------------- // m__LONG__TrackSizeInLBs Track size in LBs (logical blocks) // m__LONG__TrackStartingLBA Track starting LBA (logical block address) // m__BOOLEAN__IsUnicode Is name in Unicode format or not (see below) // m__CHAR__TrackName Track name (absolute path & name) in ANSI or Unicode format (see above) // m__PVOID__File Pointer to internally created disk file object (NULL initially) // m__BOOLEAN__IsDataTrack Is this data track (audio otherwise) // m__BOOLEAN__IsRawTrack Is this raw track (MDF image) // m__BOOLEAN__IsAudioExTrack Is this extended audio track (2448 UCHARs/logical block) // </TABLE> typedef struct _DAO_DISC_LAYOUT_ENTRY { LONG m__LONG__TrackSizeInLBs; // Track size in LBs (logical blocks) LONG m__LONG__TrackStartingLBA; // Track starting LBA (logical block address) BOOLEAN m__BOOLEAN__IsUnicode; // Is name in Unicode format or not (see below) CHAR m__CHAR__TrackName[ ( MAX_PATH * 3 ) ]; // Track name (absolute path & name) in ANSI or Unicode format (see above) PVOID m__PVOID__File; // Pointer to internally created disk file object (NULL initially) BOOLEAN m__BOOLEAN__IsDataTrack; // Is this data track (audio otherwise) BOOLEAN m__BOOLEAN__IsRawTrack; // Is this raw track (MDF image) BOOLEAN m__BOOLEAN__IsAudioExTrack; // Is this extended audio track (2448 UCHARs/logical block) } *PDAO_DISC_LAYOUT_ENTRY, DAO_DISC_LAYOUT_ENTRY; // // Structure that represents DAO disc layout // // <TABLE> // Member Definition // ---------- --------------- // m__LONG__NumberOfEntries Number of entries // m__DAO_DISC_LAYOUT_ENTRY DAO disc layout entries // </TABLE> typedef struct _DAO_DISC_LAYOUT { LONG m__LONG__NumberOfEntries; // Number of entries DAO_DISC_LAYOUT_ENTRY m__DAO_DISC_LAYOUT_ENTRY[ NUMBER_OF_TRACKS ]; // DAO disc layout entries } *PDAO_DISC_LAYOUT, DAO_DISC_LAYOUT;
Code:
STARBURN_IMPEX_API EXCEPTION_NUMBER __stdcall StarBurn_CdvdBurnerGrabber_DiscAtOnceRawPWFromFileAudioUnicode( IN PVOID p__PVOID__CdvdBurnerGrabber, OUT PCHAR p__PCHAR__ExceptionText, IN ULONG p__ULONG__ExceptionTextSizeInUCHARs, OUT PULONG p__PULONG__SystemError, OUT PCDB_FAILURE_INFORMATION p__PCDB_FAILURE_INFORMATION, IN PDAO_DISC_LAYOUT p__PDAO_DISC_LAYOUT, IN BOOLEAN p__BOOLEAN__IsXA, IN BOOLEAN p__BOOLEAN__IsTestWrite, IN BOOLEAN p__BOOLEAN__IsNextSessionAllowed, IN BOOLEAN p__BOOLEAN__IsSubChannelRepairRequired, IN ULONG p__ULONG__WriteReportDelayInSeconds, IN ULONG p__ULONG__BufferStatusReportDelayInSeconds );
Comment