· 6 years ago · May 25, 2019, 07:54 PM
1//-----------------------------------------------------------------------------
2// primosdk.h
3// Copyright (c) 2002 - 2004, Sonic Solutions. All rights reserved.
4//-----------------------------------------------------------------------------
5
6
7////////////////////////////////////////////////////////////////////
8// //
9// //
10// P r i m o S D K //
11// ======================== //
12// //
13// //
14// CD and DVD mastering API for Windows 9x, ME, NT, 2000 and XP. //
15// //
16// The use of this SDK must be done only under signed License //
17// Agreement with Sonic Solutions //
18// //
19// This computer program is protected by copyright law and //
20// international treaties. Unauthorized reproduction or //
21// distribution of this program, or any portion of it, may result //
22// in severe civil and criminal penalties. //
23// //
24// Copyright (C) 2002 Sonic Solutions //
25// //
26////////////////////////////////////////////////////////////////////
27
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33
34typedef HRESULT (__cdecl *PrimoSDK_CreateWmaReader)(DWORD dwRights, // Rights param (see WMA Documentation)
35 void* pReader); // Pointer to the receiving pointer
36
37// REPLY CODES
38//
39// (FOR EXPLANATION OF EACH REPLY CODE, PLEASE SEE BELOW IN THE DOCUMENTATION OF
40// THE FUNCTION THAT IS RETURNING THE REPLY YOU LOOK FOR)
41//
42#define PRIMOSDK_OK 0
43#define PRIMOSDK_CMDSEQUENCE 1
44#define PRIMOSDK_NOASPI 2
45#define PRIMOSDK_NO_DRIVER 2
46#define PRIMOSDK_INTERR 3
47#define PRIMOSDK_BADPARAM 4
48#define PRIMOSDK_ALREADYEXIST 6
49#define PRIMOSDK_NOTREADABLE 7
50#define PRIMOSDK_NOSPACE 8
51#define PRIMOSDK_INVALIDMEDIUM 9
52#define PRIMOSDK_RUNNING 10
53#define PRIMOSDK_BUR 11
54#define PRIMOSDK_SCSIERROR 12
55#define PRIMOSDK_UNITERROR 13
56#define PRIMOSDK_NOTREADY 14
57#define PRIMOSDK_INVALIDSOURCE 16
58#define PRIMOSDK_INCOMPATIBLE 17
59#define PRIMOSDK_FILEERROR 18
60#define PRIMOSDK_ITSADEMO 23
61#define PRIMOSDK_USERABORT 24
62#define PRIMOSDK_BADHANDLE 25
63#define PRIMOSDK_BADUNIT 26
64#define PRIMOSDK_ERRORLOADING 27
65#define PRIMOSDK_NOAINCONTROL 29
66#define PRIMOSDK_READERROR 30
67#define PRIMOSDK_WRITEERROR 31
68#define PRIMOSDK_TMPOVERFLOW 32
69#define PRIMOSDK_DVDSTRUCTERROR 33
70#define PRIMOSDK_FILETOOLARGE 34
71#define PRIMOSDK_CACHEFULL 35
72#define PRIMOSDK_FEATURE_NOT_SUPPORTED 36
73#define PRIMOSDK_FEATURE_DISABLED 37
74#define PRIMOSDK_CALLBACK_ERROR 38 // returned from the callers callback function to terminate stream
75#define PRIMOSDK_PROTECTEDWMA 39
76#define PRIMOSDK_LIMITEXPIRED 40
77#define PRIMOSDK_INVALIDPROPERTY 41
78#define PRIMOSDK_NEEDFULLERASE 42
79
80// Parameter used for PrimoSDK_InitStreamFileSystem
81#define PRIMOSDK_INIT_AUTO_DETECT_DRIVER 0x00000001 // similar in behavior to PrimoSDK_Init
82#define PRIMOSDK_INIT_SELECT_BEST_DRIVER 0x00000002 // pick only the best driver, reports PRIMOSDK_NO_DRIVER otherwise
83#define PRIMOSDK_INIT_SELECT_IMAPI2 0x00000004 // Force usage of IMAPI2, reports PRIMOSDK_NO_DRIVER if IMAPI2 is not available.
84#define PRIMOSDK_INIT_SELECT_SPTI 0x00000008 // Force usage of SPTI (or ASPI on Win9x)
85#define PRIMOSDK_INIT_STREAM_FILE_SYSTEM 0x80000000 // select stream file system (This flag is always selected for calls to PrimoSDK_InitStreamFileSystem)
86
87//
88// UNIT TYPES AND MEDIA TYPES
89//
90#define PRIMOSDK_CDROM 0x00000201
91#define PRIMOSDK_CDR 0x00000202
92#define PRIMOSDK_CDRW 0x00000203
93#define PRIMOSDK_DVDROM 0x00000205
94#define PRIMOSDK_DVDR 0x00000204
95#define PRIMOSDK_DVDRW 0x00000207
96#define PRIMOSDK_DVDPR 0x00000210
97#define PRIMOSDK_DVDPRW 0x00000209
98#define PRIMOSDK_DVDRAM 0x00000206
99#define PRIMOSDK_DDCDROM 0x00000211
100#define PRIMOSDK_DDCDR 0x00000212
101#define PRIMOSDK_DDCDRW 0x00000213
102#define PRIMOSDK_DVDPR9 0x00000214 // dual-layer DVD+R
103#define PRIMOSDK_DVDR9 0x00000215 // dual-layer DVD-R
104#define PRIMOSDK_BDRE 0x00000216 // rewritable BD.
105#define PRIMOSDK_BDR 0x00000217 // Write-Once BD.
106#define PRIMOSDK_BDROM 0x00000218
107#define PRIMOSDK_HDDVDRW 0x00000219 // rewritable HD media
108#define PRIMOSDK_HDDVDR 0x00000220 // Write-Once HD
109#define PRIMOSDK_HDDVDROM 0x00000221
110
111//
112#define PRIMOSDK_ROBOTICS 0x00000208
113#define PRIMOSDK_OTHER 0x00000220
114
115//
116// DISC TYPES
117//
118// (FOR EXPLANATION, PLEASE SEE BELOW IN THE DOCUMENTATION OF THE PrimoSDK_DiscInfo)
119//
120#define PRIMOSDK_SILVER 0x00000301
121#define PRIMOSDK_COMPLIANTGOLD 0x00000302
122#define PRIMOSDK_OTHERGOLD 0x00000303
123#define PRIMOSDK_BLANK 0x00000304
124
125//
126// BUS TYPES
127//
128//
129#define PRIMOSDK_BUS_UNKNOWN 0
130#define PRIMOSDK_ATAPI 1
131#define PRIMOSDK_SCSI 2
132#define PRIMOSDK_1394 3
133#define PRIMOSDK_USB 4
134#define PRIMOSDK_USB2 5
135
136//
137// DISC FORMAT CODING
138//
139// (FOR EXPLANATION, PLEASE SEE BELOW IN THE DOCUMENTATION OF THE PrimoSDK_DiscInfo)
140//
141#define PRIMOSDK_GENERICCD 0x000000C1
142#define PRIMOSDK_B1 0x000000B1
143#define PRIMOSDK_D1 0x000000D1
144#define PRIMOSDK_D2 0x000000D2
145#define PRIMOSDK_D3 0x000000D3
146#define PRIMOSDK_D4 0x000000D4
147#define PRIMOSDK_D5 0x000000D5
148#define PRIMOSDK_D6 0x000000D6
149#define PRIMOSDK_D7 0x000000D7
150#define PRIMOSDK_D8 0x000000D8
151#define PRIMOSDK_D9 0x000000D9
152#define PRIMOSDK_A1 0x000000A1
153#define PRIMOSDK_A2 0x000000A2
154#define PRIMOSDK_A3 0x000000A3
155#define PRIMOSDK_A4 0x000000A4
156#define PRIMOSDK_A5 0x000000A5
157#define PRIMOSDK_M1 0x000000E1
158#define PRIMOSDK_M2 0x000000E2
159#define PRIMOSDK_M3 0x000000E3
160#define PRIMOSDK_M4 0x000000E4
161#define PRIMOSDK_M5 0x000000E5
162#define PRIMOSDK_M6 0x000000E6
163#define PRIMOSDK_F1 0x000000F1
164#define PRIMOSDK_F2 0x000000F2
165#define PRIMOSDK_F3 0x000000F3
166#define PRIMOSDK_F4 0x000000F4
167#define PRIMOSDK_F5 0x000000F5
168#define PRIMOSDK_F8 0x000000F8
169#define PRIMOSDK_FA 0x000000FA
170
171//
172// TRACK TYPES
173//
174//
175
176#define PRIMOSDK_AUDIO_TRACK 0
177#define PRIMOSDK_MODE1_TRACK 1
178#define PRIMOSDK_MODE2_TRACK 2
179
180
181//
182// FLAGS
183//
184// (FOR EXPLANATION, PLEASE SEE BELOW IN THE DOCUMENTATION OF THE VARIOUS FUNCTIONS
185// THAT LIST EACH FLAG THEY USE)
186//
187#define PRIMOSDK_OPENTRAYEJECT 0x00000001
188#define PRIMOSDK_CLOSETRAY 0x00000002
189#define PRIMOSDK_LOCK 0x00000004
190#define PRIMOSDK_UNLOCK 0x00000008
191#define PRIMOSDK_TEST 0x00000010
192#define PRIMOSDK_WRITE 0x00000020
193#define PRIMOSDK_IMMEDIATE 0x00000040
194#define PRIMOSDK_BURNPROOF 0x00000080
195#define PRIMOSDK_HIGHDENSITY 0x80000000 // used to be 0x100 but that conflicts with ISOLEVEL1 below.
196#define PRIMOSDK_COPYRIGHT 0x00000200
197#define PRIMOSDK_EMPHASIS 0x00000400
198#define PRIMOSDK_ALLOW_NONSTANDARD_LAYER 0x00008000 // PrimoSDK_WriteImage flag to allow non-compliant layer break on DVD Video
199#define PRIMOSDK_FORCE_REFRESH 0x00010000
200#define PRIMOSDK_FAST_WRITE 0x80000000 // PrimoSDK_WriteImage flag to make drive write file data without read-after-write
201#define PRIMOSDK_VNR_WRITE 0x00000008 // write to disc faster by using "Verify Not Required" mode (when supported)
202
203//
204// Mastering flags
205//
206#define PRIMOSDK_ISOLEVEL1 0x00000100
207#define PRIMOSDK_JOLIET 0x00000200
208#define PRIMOSDK_UDF 0x00000400
209#define PRIMOSDK_DVDPRQUICK 0x00000800
210#define PRIMOSDK_ORIGDATE 0x00001000
211#define PRIMOSDK_USERTIMESET 0x00001000 // use for streamed files since they don't have an "original date"
212#define PRIMOSDK_SETNOW 0x00002000
213#define PRIMOSDK_MODE1 0x00004000
214#define PRIMOSDK_MODE2 0x00008000
215#define PRIMOSDK_CLOSEDISC 0x00010000
216#define PRIMOSDK_COPYPREGAP 0x00020000
217#define PRIMOSDK_NOPREGAP 0x00040000
218#define PRIMOSDK_RESETDRIVES 0x00080000
219#define PRIMOSDK_UDF201 0x00100000
220#define PRIMOSDK_ISOLEVEL2 0x00200000
221#define PRIMOSDK_ISOLEVEL3 0x00400000 //aka ISO Level 2 long (long filenames)
222#define PRIMOSDK_SAO 0x00800000
223#define PRIMOSDK_TAO 0x01000000
224#define PRIMOSDK_VIDEOCD 0x02000000
225#define PRIMOSDK_CHECKDUPLI 0x04000000
226#define PRIMOSDK_DVDIMAGE 0x08000000
227#define PRIMOSDK_VERSIONLESS_ISO 0x10000000 //for ETFSBOOT.COM boot CDs only
228#define PRIMOSDK_BAD_ISOLEVEL1_NOVERSION 0x10000000 //for ETFSBOOT.COM boot CDs only
229#define PRIMOSDK_PRESERVE_ISO_VARIATIONS 0x20000000 //only for appending to media that is out
230 //of ISO spec and you want to preserve
231 //the existing file system as is.
232#define PRIMOSDK_UDF250 0x40000000
233#define PRIMOSDK_UDF260 0x00000080
234
235//
236#define PRIMOSDK_IMAGE_M1_2048 0x00100000
237#define PRIMOSDK_IMAGE_M2_2336 0x00200000
238#define PRIMOSDK_IMAGE_M2_2352 0x00400000
239//
240#define PRIMOSDK_GETSTATUS 0x01000000
241#define PRIMOSDK_ABORT 0x02000000
242//
243#define PRIMOSDK_SSCLASS 0x00001F40
244//
245#define PRIMOSDK_MAX 0x00000000
246#define PRIMOSDK_MEDIUM 0xFFFFF000
247#define PRIMOSDK_MIN 0xFFFFFF00
248#define PRIMOSDK_BEST 0xFFFFFFF0
249//
250#define PRIMOSDK_DEMOVERSION 0x00000401
251#define PRIMOSDK_CDDVDVERSION 0x00000404
252//
253#define PRIMOSDK_ERASEQUICK 0x00000001
254#define PRIMOSDK_ERASEFULL 0x00000002
255#define PRIMOSDK_ERASELAST 0x00000004
256//
257#define PRIMOSDK_FLOPPY144 144
258#define PRIMOSDK_FLOPPY288 288
259#define PRIMOSDK_FLOPPY12 0x04000000
260#define PRIMOSDK_HD 0x02000000
261#define PRIMOSDK_NOEMULATION 0x01000000
262#define PRIMOSDK_NOEMULATION_WITH_SET_BOOT_INFO 0x11000000
263//
264#define PRIMOSDK_NODATA 0x00000000
265#define PRIMOSDK_DATAIN 0x00000001
266#define PRIMOSDK_DATAOUT 0x00000002
267//
268#define PRIMOSDK_DVDUNKNOWN 0x00000000
269#define PRIMOSDK_DVDDATA 0x00000001
270#define PRIMOSDK_DVDAUDIO 0x00000002
271#define PRIMOSDK_DVDVIDEO 0x00000004
272#define PRIMOSDK_DVDVR 0x00000008
273#define PRIMOSDK_DVDSTREAM 0x00000010
274#define PRIMOSDK_DEFECTMAPPING 0x00000020
275//
276#define PRIMOSDK_PACKETWRITTEN 0x00000001
277
278#define PRIMOSDK_AUDIO_PREEMPHASIS 0x00000001
279#define PRIMOSDK_AUDIO_COPYRIGHT 0x00000002
280
281#define PRIMOSDK_STARTTRACK 0x00000001
282
283// UnitInfo2 features
284#define PRIMOSDK_UNITFEATURE_DAP 0x00000001 // supports Digital Audio Play of CDDA tracks
285
286
287// Function typedef for streaming callback function.
288// Used in advanced functionality PrimoSDK_AddAudioStream and PrimoSDK_AddFileStreamWCS
289// This function will be called repeatedly until all file data has been read.
290//
291// pBuffer - buffer containing the user data of the stream
292// dwBytesRequested - the engine requesting that number of bytes to be filled in pBuffer.
293// pdwBytesWritten - pointer to the numbers of bytes provided by the client of this SDK.
294//
295// NOTE: The value dwBytesRequested must equal to dwBytesWritten otherwise it shall be
296// considered an error.
297//
298typedef DWORD (__cdecl *PrimoSDK_StreamCallback)(PBYTE pBuffer, DWORD dwBytesRequested,
299 PDWORD pdwBytesWritten, PVOID pContext);
300
301
302DWORD WINAPI PrimoSDK_Trace ( DWORD dwTrace );
303// ================
304//
305// Set the trace mode.
306//
307// This function can be called at any time to enable or
308// disable the PrimoSDK trace.
309//
310// Param: dwTrace sets the debug trace mode. If not 0 all the calls to
311// PrimoSDK are logged in the text file <appname>.DBG
312//
313// Notes: It could be helpful to introduce a backdoor in your
314// application to activate the trace at user level.
315// In case of need, the customer can activate the
316// trace and then send the log file to you for debug.
317//
318// Return: PRIMOSDK_OK if no error
319// PRIMOSDK_INTERR if an internal error occured
320//
321
322
323
324DWORD WINAPI PrimoSDK_End ( VOID );
325// ==============
326//
327// Terminate PrimoSDK.
328//
329// This function must be called after all the other PrimoSDK calls
330// have been terminated. It frees the internal structures.
331//
332// Notes: You should call this function only once, when your
333// application or module terminates.
334//
335// Return: PRIMOSDK_OK if no error
336// PRIMOSDK_CMDSEQUENCE if not yet initialized
337// PRIMOSDK_INTERR if an internal error occurred
338//
339
340
341
342DWORD WINAPI PrimoSDK_GetHandle ( PDWORD pdwHandle );
343// ====================
344//
345// Obtains an handle to use in all the PrimoSDK call.
346//
347// The PrimoSDK_GetHandle function returns an handle that must be used
348// in any call to PrmoSDK. An handle is released calling PrimoSDK_ReleaseHandle.
349//
350// Param: pdwHandlde points to a DWORD that receives the new handle
351//
352// Notes: You can obtain as many handle as you need, to perform
353// different simultaneous operations on different drives.
354//
355// Return: PRIMOSDK_OK if no error, the handle has been created
356// PRIMOSDK_CMDSEQUENCE if not yet initialized
357// PRIMOSDK_INTERR if an internal error occurred
358//
359
360
361
362DWORD WINAPI PrimoSDK_ReleaseHandle ( DWORD dwHandle );
363// ========================
364//
365// Release an handle that has been obtained with PrimoSDK_GetHandle.
366//
367// Param: dwHandle is the handle to release
368//
369// Notes: None.
370//
371// Return: PRIMOSDK_OK if no error, the handle has been created
372// PRIMOSDK_CMDSEQUENCE if not yet initialized
373// PRIMOSDK_BADHANDLE if dwHandle is not valid
374// PRIMOSDK_INTERR if an internal error occurred
375//
376
377
378
379DWORD WINAPI PrimoSDK_UnitInfo ( DWORD dwHandle, PDWORD pdwUnit, PDWORD pdwType,
380 PBYTE szDescr, PDWORD pdwReady );
381// ===================
382//
383// Retrieve information about a unit.
384//
385// Param: dwHandle is the operation handle
386//
387// pdwUnit points to a DWORD containing the unit identification.
388// The caller can identify a unit by drive letter, as "D", or
389// SCSI Host/ID/LUN triple, as "130". If the least significant byte of the
390// DWORD is not 00 or 20 (blank), then it should contain the letter. If it
391// is 00 or 20, the other 3 bytes contain the triple. For instance:
392// to call for unit D:, pdwUnit will point to 0x00000044; instead
393// to call for unit at Host 1, ID 3, Lun 0, pdwUnit will
394// point to 0x01030000. When the function returns, the field is
395// completed by PrimoSDK, therefore, in both the previous examples,
396// it will become 0x01030044.
397// If the least significant byte is 20, instead of 00,
398// it will still go for triple, but the letter is not forced
399// by PrimoSDK inside the field that, therefore, remains unchanged.
400// For recorders of SCSI Type 4, that do not have an assigned
401// drive letter from the system, like the Yamaha CDR100,
402// or when the drives letter setting (especially under NT/2000) is
403// not completely or correctly seen by the ASPI layer,
404// the call must be done by triple only, and the last byte
405// will always be 00.
406// This format is used for any PrimoSDK call that specifies a unit.
407//
408// pdwType returns the unit type:
409// PRIMOSDK_CDROM if the unit is a CD-ROM
410// PRIMOSDK_CDR if the unit is a supported CD-R
411// PRIMOSDK_CDRW if the unit is a supported CD-RW
412// PRIMOSDK_DVDROM if the unit is a DVD-ROM
413// PRIMOSDK_DVDR if the unit is a supported DVD-R
414// PRIMOSDK_DVDRW if the unit is a supported DVD-RW
415// Note: for drives that support DVD-RW and DVD+RW,
416// PRIMOSDK_DVDRW is returned.
417// PRIMOSDK_DVDPRW if the unit is a supported DVD+RW
418// PRIMOSDK_DVDPR9 for DVD+R9
419// PRIMOSDK_DVDRAM if the unit is a supported DVD-RAM
420// PRIMOSDK_ROBOTICS if the unit is a robotics
421// PRIMOSDK_OTHER if the unit is of another type
422//
423// szDescr returns the Vendor, Product and Firmware Version of
424// the unit (if not NULL)
425//
426// pdwReady is set to 1 if the unit is ready (if not NULL)
427//
428// Notes: The szDescr must be at least 50 bytes in length. The last 4 chars.
429// of szDescr contain always the firmware version of the drive.
430//
431// Return: PRIMOSDK_OK if no error
432// PRIMOSDK_CMDSEQUENCE if not yet initialized
433// PRIMOSDK_BADUNIT if the requested drive does not exist
434// PRIMOSDK_BADHANDLE if dwHandle is not valid
435// PRIMOSDK_INTERR if an internal error occured
436//
437
438
439
440DWORD WINAPI PrimoSDK_UnitInfo2 ( DWORD dwHandle, PDWORD pdwUnit, PDWORD pdwTypes,
441 PDWORD pdwClass, PDWORD pdwBusType, PDWORD pdwFeatures );
442// ====================
443//
444// Retrieve information about a unit.
445//
446// Param: dwHandle is the operation handle
447//
448// pdwUnit points to a DWORD containing the unit identification.
449// (see PrimoSDK_UnitInfo for field format)
450//
451// pdwTypes returns a vector containing all the medium type managed by the unit,
452// closed by 0xFFFFFFFF. For instance, for a normal CD-RW, pdwTypes will
453// return:
454// PRIMOSDK_CDROM,PRIMOSDK_CDR,PRIMOSDK_CDRW,0xFFFFFFFF
455// For a combo CD-RW it will be:
456// PRIMOSDK_CDROM,PRIMOSDK_CDR,PRIMOSDK_CDRW,PRMOSDK_DVDROM,0xFFFFFFFF
457// and so on.
458//
459// pdwClass is the class identifier assigned to this drive. Different brand drives
460// can have the same class. If the drive is taken by the "Silent Select"
461// mechanism, which means that it is not in the drive table but it is
462// still managed, this value would be the special value PRIMOSDK_SSCLASS
463//
464// pdwBusType is the bus type that the device is connected to.
465//
466// pdwFeatures is a DWORD bitfield that identifies features and capabilities
467// of the drive.
468//
469// Notes: remember to allow enough DWORD's under pdwTypes as some combo units can
470// handle several type of media.
471//
472// Return: PRIMOSDK_OK if no error
473// PRIMOSDK_CMDSEQUENCE if not yet initialized
474// PRIMOSDK_BADUNIT if the requested drive does not exist
475// PRIMOSDK_BADHANDLE if dwHandle is not valid
476// PRIMOSDK_INTERR if an internal error occured
477//
478
479
480
481DWORD WINAPI PrimoSDK_UnitSpeeds ( DWORD dwHandle, PDWORD pdwUnit, PDWORD pdwCDSpeeds,
482 PDWORD pdwDVDSpeeds, PDWORD pdwCapabilities );
483// =====================
484//
485// This API has been deprecated. Drive speeds are no longer supported, use only
486// current media speeds obtained with PrimoSDK_GetDiscSpeedList.
487//
488// Retrieve the various speeds of a unit.
489//
490// Param: dwHandle is the operation handle
491//
492// pdwUnit points to a DWORD containing the unit identification.
493// (see PrimoSDK_UnitInfo for field format)
494//
495// pdwCDSpeeds returns the unit speeds for CD. There are 3 set of values:
496// the reading speeds, the CD-R speeds, and the CD-RW, each set terminated by
497// 0xFFFFFFFF. Some speeds can be empty (just the terminator) when not managed.
498// For instance in the case of a drive which reads at 24x and records only on
499// CD-R at 2x and 4x, this parameter will return (hex):
500// 0x00000018,0xFFFFFFFF,0x00000002,0x00000004,0xFFFFFFFF,0xFFFFFFFF
501// The caller needs to be sure that this paramter is pointed to a vector of at
502// least 66 DWORD, as some drive can operate on many speeds.
503//
504// pdwDVDSpeeds is as above, but for DVD-ROM, DVD-R and DVD-RW. If the drive
505// does not support DVD, this parameter will point to:
506// 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
507//
508// pdwCapabilities will point to a DWORD with some drive capabilities
509// 1st bit (0x00000001) is set if the drive supports BURN-Proof
510// 2nd bit (0x00000002) is set if the drive handles CD Text
511// 3rd bit (0x00000004) is set if the drive support AWS (better speed for the
512// media and therefore accept PRIMOSDK_BEST as a speed)
513// 4th bit (0x00000008) is set if the drive support reading DVD-ROM discs
514// 5th bit (0x00000010) is set if the drive needs to open the tray after Test
515// 6th bit (0x00000020) is set if the drive needs to open the tray after Record
516// 7th bit (0x00000040) is set if the drive supports High-density recording.
517//
518// Notes: the reading speed, for both CD and DVD is always represented by a single
519// value, the declared maximum.
520//
521// To support silent select drives, caller should call PrimoSDK_UnitInfo2 to determine
522// the drive class.
523// If the drive class is managed by Silent Select (see PrimoSDK_UnitInfo2) then only
524// the faster speed is return and not recommended for display.
525// The caller should use PRIMOSDK_MAX, PRIMOSDK_MEDIUM or PRIMOSDK_MIN speeds then.
526// If the caller uses PRIMOSDK_BEST on a drive that does not support AWS, then
527// the speed will revert to PRIMOSDK_MAX
528//
529// Return: PRIMOSDK_OK if no error
530// PRIMOSDK_CMDSEQUENCE if not yet initialized
531// PRIMOSDK_BADUNIT if the requested drive does not exist
532// PRIMOSDK_BADHANDLE if dwHandle is not valid
533// PRIMOSDK_INTERR if an internal error occured
534//
535
536
537
538DWORD WINAPI PrimoSDK_UnitReady ( DWORD dwHandle, PDWORD pdwUnit );
539// ====================
540//
541// Test if the unit is ready.
542//
543// Param: dwHandle is the operation handle
544//
545// pdwUnit points to a DWORD containing the unit identification
546// (see PrimoSDK_UnitInfo for field format)
547//
548// Notes: This function performs the bare minimum elaboration and is the one
549// to call in timer loop while waiting for a drive to become ready.
550// This function must be called only on CD or DVD drives. Calling this
551// function on Hard Disk, boards or other units that you can still
552// identify by SCSI triple could have unpredictable results.
553//
554// Return: PRIMOSDK_OK if no error, the unit is ready
555// PRIMOSDK_CMDSEQUENCE if not yet initialized
556// PRIMOSDK_BADUNIT if the unit does not exist
557// PRIMOSDK_NOTREADY if the unit is not ready
558// PRIMOSDK_BADHANDLE if dwHandle is not valid
559// PRIMOSDK_INTERR if an internal error occured
560//
561
562
563
564DWORD WINAPI PrimoSDK_DiscInfoEx ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwFlags,
565 PDWORD pdwMediumType, PDWORD pdwMediumFormat,
566 PDWORD pdwErasable, PDWORD pdwTracks,
567 PDWORD pdwUsed, PDWORD pdwFree );
568// ===================
569//
570// Retrieve information about the medium inside pdwUnit.
571//
572// Param: dwHandle is the operation handle
573//
574// pdwUnit points to a DWORD containing the unit identification.
575// (see PrimoSDK_UnitInfo for field format)
576//
577// dwFlags is either 0 or PRIMOSDK_TAO
578// PRMIOSDK_TAO sets the drive mode to incremental or TAO
579// instead of DAO before retrieving disc information to
580// return the correct available sectors in that mode.
581//
582// pdwMediumType returns the type of the medium (if not NULL):
583// PRIMOSDK_SILVER if the disc is not recordable
584// PRIMOSDK_COMPLIANTGOLD if the disc is recordable by PrimoSDK
585// PRIMOSDK_OTHERGOLD if the disc is recordable but not usable
586// by PrimoSDK (other type of unclosed disc)
587// PRIMOSDK_BLANK if the disc is a blank recordable medium
588//
589// pdwErasable returns 1 if the medium is erasable (an erasable disc
590// inside a CD-RW drive) and 0 otherwise
591//
592// pdwMediumFormat returns the format of the medium (if not NULL):
593// PRIMOSDK_B1 - Blank Disc
594// PRIMOSDK_D1 - Data Mode 1 DAO (like the MSVC++ or a typical DOS game)
595// PRIMOSDK_D2 - Kodak Photo CD - Data multis. Mode 2 TAO
596// PRIMOSDK_D3 - Gold Data Mode 1 - Data multis. Mode 1, closed
597// PRIMOSDK_D4 - Gold Data Mode 2 - Data multis. Mode 2, closed
598// PRIMOSDK_D5 - Data Mode 2 DAO (silver mastered from Corel or Toast gold)
599// PRIMOSDK_D6 - CDRFS - Fixed packet (from Sony packet writing solution)
600// PRIMOSDK_D7 - Packet writing
601// PRIMOSDK_D8 - Gold Data Mode 1 - Data multis. Mode 1, open
602// PRIMOSDK_D9 - Gold Data Mode 2 - Data multis. Mode 2, open
603// PRIMOSDK_A1 - Audio DAO Silver, like almost any music disc, or Closed Golg
604// PRIMOSDK_A2 - Audio Gold disc not closed (TAO or SAO)
605// PRIMOSDK_A3 - First type of Enhanced CD (aborted)
606// PRIMOSDK_A4 - CD Extra, Blue Book standard
607// PRIMOSDK_A5 - Audio TAO tracks with session not closed, the (HP way)
608// PRIMOSDK_M1 - First track Data and other audio
609// PRIMOSDK_M2 - Gold TAO (like the ones made with Easy-CD 16 or 32 versions)
610// PRIMOSDK_M3 - Kodak Portfolio (as the Kodak standard)
611// PRIMOSDK_M4 - Video CD (as the White Book standard)
612// PRIMOSDK_M5 - CD-i (as the Green Book standard)
613// PRIMOSDK_M6 - PlayStation (Sony games)
614// PRIMOSDK_F1 - DVD-ROM
615// PRIMOSDK_F3 - Recordable DVD-R, closed
616// PRIMOSDK_F4 - Appendable (not-closed) disc
617// PRIMOSDK_F5 - Layer Jump DVD-R9 disc
618// PRIMOSDK_F8 - Recordable DVD-R, open
619// PRIMOSDK_FA - DVD-RAM cartridge
620// PRIMOSDK_GENERICCD - Other
621//
622// pdwTracks number of tracks in the disc (if not NULL)
623// (always valid, 0 if PRIMOSDK_BLANK)
624//
625// pdwUsed total number of used sectors in the disc (if not NULL)
626//
627// pdwFree total number of free sectors in the disc (if not NULL)
628// (1 sector is 2048 bytes for the PRIMOSDK_COMPLIANTGOLD)
629//
630// Notes: Before starting any recording operation, the caller should check
631// the presence of blank discs in all the engaged recorders using
632// this function.
633//
634// For DVD+RW, DVD+RW media will always be reported as PRIMOSDK_F8 because of
635// the nature of the media.
636//
637// Return: PRIMOSDK_OK if no error
638// PRIMOSDK_CMDSEQUENCE if not yet initialized
639// PRIMOSDK_BADUNIT if the unit does not exist
640// PRIMOSDK_BADPARAM if incorrect parameters
641// PRIMOSDK_UNITERROR if the unit reported a reading error
642// PRIMOSDK_BADHANDLE if dwHandle is not valid
643// PRIMOSDK_INTERR if an internal error occured
644//
645
646
647
648DWORD WINAPI PrimoSDK_DiscInfo ( DWORD dwHandle, PDWORD pdwUnit, PDWORD pdwMediumType,
649 PDWORD pdwMediumFormat, PDWORD pdwErasable, PDWORD pdwTracks,
650 PDWORD pdwUsed, PDWORD pdwFree );
651// ===================
652//
653// Retrieve information about the medium inside pdwUnit.
654//
655// Param: dwHandle is the operation handle
656//
657// pdwUnit points to a DWORD containing the unit identification.
658// (see PrimoSDK_UnitInfo for field format)
659//
660// pdwMediumType returns the type of the medium (if not NULL):
661// PRIMOSDK_SILVER if the disc is not recordable
662// PRIMOSDK_COMPLIANTGOLD if the disc is recordable by PrimoSDK
663// PRIMOSDK_OTHERGOLD if the disc is recordable but not usable
664// by PrimoSDK (other type of unclosed disc)
665// PRIMOSDK_BLANK if the disc is a blank recordable medium
666//
667// pdwErasable returns 1 if the medium is erasable (an erasable disc
668// inside a CD-RW drive) and 0 otherwise
669//
670// pdwMediumFormat returns the format of the medium (if not NULL):
671// PRIMOSDK_B1 - Blank Disc
672// PRIMOSDK_D1 - Data Mode 1 DAO (like the MSVC++ or a typical DOS game)
673// PRIMOSDK_D2 - Kodak Photo CD - Data multis. Mode 2 TAO
674// PRIMOSDK_D3 - Gold Data Mode 1 - Data multis. Mode 1, closed
675// PRIMOSDK_D4 - Gold Data Mode 2 - Data multis. Mode 2, closed
676// PRIMOSDK_D5 - Data Mode 2 DAO (silver mastered from Corel or Toast gold)
677// PRIMOSDK_D6 - CDRFS - Fixed packet (from Sony packet writing solution)
678// PRIMOSDK_D7 - Packet writing
679// PRIMOSDK_D8 - Gold Data Mode 1 - Data multis. Mode 1, open
680// PRIMOSDK_D9 - Gold Data Mode 2 - Data multis. Mode 2, open
681// PRIMOSDK_A1 - Audio DAO Silver, like almost any music disc, or Closed Golg
682// PRIMOSDK_A2 - Audio Gold disc not closed (TAO or SAO)
683// PRIMOSDK_A3 - First type of Enhanced CD (aborted)
684// PRIMOSDK_A4 - CD Extra, Blue Book standard
685// PRIMOSDK_A5 - Audio TAO tracks with session not closed, the (HP way)
686// PRIMOSDK_M1 - First track Data and other audio
687// PRIMOSDK_M2 - Gold TAO (like the ones made with Easy-CD 16 or 32 versions)
688// PRIMOSDK_M3 - Kodak Portfolio (as the Kodak standard)
689// PRIMOSDK_M4 - Video CD (as the White Book standard)
690// PRIMOSDK_M5 - CD-i (as the Green Book standard)
691// PRIMOSDK_M6 - PlayStation (Sony games)
692// PRIMOSDK_F1 - DVD-ROM
693// PRIMOSDK_F3 - Recordable DVD-R, closed
694// PRIMOSDK_F4 - Appendable (not-closed) disc
695// PRIMOSDK_F5 - Layer Jump DVD-R9 disc
696// PRIMOSDK_F8 - Recordable DVD-R, open
697// PRIMOSDK_FA - DVD-RAM cartridge
698// PRIMOSDK_GENERICCD - Other
699//
700// pdwTracks number of tracks in the disc (if not NULL)
701// (always valid, 0 if PRIMOSDK_BLANK)
702//
703// pdwUsed total number of used sectors in the disc (if not NULL)
704//
705// pdwFree total number of free sectors in the disc (if not NULL)
706// (1 sector is 2048 bytes for the PRIMOSDK_COMPLIANTGOLD)
707//
708// Notes: Before starting any recording operation, the caller should check
709// the presence of blank discs in all the engaged recorders using
710// this function.
711//
712// For DVD+RW, DVD+RW media will always be reported as PRIMOSDK_F8 because of
713// the nature of the media.
714//
715// Return: PRIMOSDK_OK if no error
716// PRIMOSDK_CMDSEQUENCE if not yet initialized
717// PRIMOSDK_BADUNIT if the unit does not exist
718// PRIMOSDK_BADPARAM if incorrect parameters
719// PRIMOSDK_UNITERROR if the unit reported a reading error
720// PRIMOSDK_BADHANDLE if dwHandle is not valid
721// PRIMOSDK_INTERR if an internal error occured
722//
723
724
725
726DWORD WINAPI PrimoSDK_DiscInfo2 ( DWORD dwHandle, PDWORD pdwUnit, PDWORD pdwMedium,
727 PDWORD pdwProtectedDVD, PDWORD pdwFlags,
728 PDWORD pdwMediumEx, PDWORD pdwRFU3 );
729// ====================
730//
731// Retrieve additional information about the medium inside pdwUnit.
732//
733// Param: dwHandle is the operation handle
734//
735// pdwUnit points to a DWORD containing the unit identification.
736// (see PrimoSDK_UnitInfo for field format)
737//
738// pdwMedium returns the physical type of the medium (if not NULL):
739// PRIMOSDK_CDROM for CD-ROM, DDCD-ROM
740// PRIMOSDK_CDR for CD-R, DDCD-R
741// PRIMOSDK_CDRW for CD-RW, DDCD-RW
742// PRIMOSDK_DVDROM for DVD-ROM (any type)
743// PRIMOSDK_DVDR for DVD-R
744// PRIMOSDK_DVDRW for DVD-RW
745// PRIMOSDK_DVDPR for DVD+R
746// PRIMOSDK_DVDPRW for DVD+RW
747// PRIMOSDK_DVDRAM for DVD-RAM
748// PRIMOSDK_DVDPR9 for DVD+R9
749// PRIMOSDK_DVDR9 for DVD-R9
750// PRIMOSDK_BDRE for BD-RE
751// PRIMOSDK_BDR for BD-R
752// PRIMOSDK_OTHER for other types
753//
754// pdwProtectedDVD returns 1 if the medium is a protected DVD and 0 otherwise
755// (if not NULL)
756//
757// pdwFlags returns any of the following values (if not NULL):
758// PRIMOSDK_PACKETWRITTEN if the media is formatted by packet writing
759// PRIMOSDK_HIGHDENSITY if the media was written in high-density mode
760// software (currently only set for DVD-RW)
761//
762// pdwMediumEx returns the physical type of the medium (if not NULL):
763// PRIMOSDK_CDROM for CD-ROM
764// PRIMOSDK_CDR for CD-R
765// PRIMOSDK_CDRW for CD-RW
766// PRIMOSDK_DDCDROM for DDCD-ROM
767// PRIMOSDK_DDCDR for DDCD-R
768// PRIMOSDK_DDCDRW for DDCD-RW
769// PRIMOSDK_DVDROM for DVD-ROM (any type)
770// PRIMOSDK_DVDR for DVD-R
771// PRIMOSDK_DVDRW for DVD-RW
772// PRIMOSDK_DVDPR for DVD+R
773// PRIMOSDK_DVDPRW for DVD+RW
774// PRIMOSDK_DVDRAM for DVD-RAM
775// PRIMOSDK_BDRE for BD-RE
776// PRIMOSDK_BDR for BD-R
777// PRIMOSDK_DVDPR9 for DVD+R9
778// PRIMOSDK_DVDR9 for DVD-R9
779// PRIMOSDK_OTHER for other types
780//
781// pdwRFU3 is reserved for future use
782//
783// Notes: Before calling this function you must have already called PrimoSDK_DiscInfo.
784//
785// Return: PRIMOSDK_OK if no error
786// PRIMOSDK_CMDSEQUENCE if not yet initialized
787// PRIMOSDK_BADUNIT if the unit does not exist
788// PRIMOSDK_BADPARAM if incorrect parameters
789// PRIMOSDK_UNITERROR if the unit reported a reading error
790// PRIMOSDK_BADHANDLE if dwHandle is not valid
791// PRIMOSDK_INTERR if an internal error occured
792//
793
794DWORD WINAPI PrimoSDK_GetDiscSpeedList (DWORD dwHandle, PDWORD pdwUnit,
795 DWORD dwNumSpeeds,
796 PDWORD pdwNumSpeeds,
797 PDWORD pdwSpeedList100thX);
798// =======================
799//
800// Ask and retrieve the the list of speeds of a disc, in 100th of X.
801//
802// Param: dwHandle is the operation handle
803//
804// pdwUnit points to a DWORD containing the unit identification.
805// (see PrimoSDK_UnitInfo for field format)
806//
807// dwNumSpeeds is number of DWORDs that is allocated by the client of the SDK.
808//
809// pdwNumSpeeds is the actual number of speeds returned.
810//
811// pdwSpeedList100thX is the list containing the list of speeds in 100th of X
812//
813// Return: PRIMOSDK_OK if no error
814// PRIMOSDK_CMDSEQUENCE if not yet initialized
815// PRIMOSDK_BADUNIT if the unit does not exist
816// PRIMOSDK_UNITERROR if the unit reported an error
817// PRIMOSDK_BADHANDLE if dwHandle is not valid
818// PRIMOSDK_INTERR if an internal error occured
819//
820
821
822DWORD WINAPI PrimoSDK_GetDiscSpeed (DWORD dwHandle, PDWORD pdwUnit,
823 DWORD dwRequestedSpeed100thX, LPDWORD pdwGottenSpeed100thX );
824// =======================
825//
826// Ask and retrieve the exact speed of a disc, in 100th of X.
827//
828// Param: dwHandle is the operation handle
829//
830// pdwUnit points to a DWORD containing the unit identification.
831// (see PrimoSDK_UnitInfo for field format)
832//
833// pwRequestedSpeed100thX is the requested speed in 100th of x.
834//
835// pdwGottenSpeed100thX is where is returned the actual speed the drive agreed
836// on the disc for the speed request
837//
838// Return: PRIMOSDK_OK if no error
839// PRIMOSDK_CMDSEQUENCE if not yet initialized
840// PRIMOSDK_BADUNIT if the unit does not exist
841// PRIMOSDK_UNITERROR if the unit reported an error
842// PRIMOSDK_BADHANDLE if dwHandle is not valid
843// PRIMOSDK_INTERR if an internal error occured
844//
845
846
847
848DWORD WINAPI PrimoSDK_GetDVDType (DWORD dwHandle, PDWORD pdwUnit, LPDWORD pdwType,
849 LPDWORD pdwRFU );
850// =====================
851//
852// Retrieve type of DVD media inside pdwUnit
853//
854// Param: dwHandle is the operation handle
855//
856// pdwUnit points to a DWORD containing the unit identification.
857// (see PrimoSDK_UnitInfo for field format)
858//
859// pdwType returns the type of DVD media
860// PRIMOSDK_DVDUNKNOWN if unknown or not a DVD
861// PRIMOSDK_DVDDATA if is DVD data
862// PRIMOSDK_DVDAUDIO if disc has DVD-Audio
863// PRIMOSDK_DVDVIDEO if disc has DVD-Video
864// PRIMOSDK_DVDSTREAM if DVD Stream Recording
865// PRIMOSDK_DEFECTMAPPING if the disc is contains defect mapping sectors (i.e Mt. Rainer)
866//
867// pdwRFU is reserved for future use
868//
869// Notes: This function will not work correctly if the drive is locked via
870// PrimoSDK_UnitAIN()
871//
872// Return: PRIMOSDK_OK if no error
873// PRIMOSDK_CMDSEQUENCE if not yet initialized
874// PRIMOSDK_BADUNIT if the unit does not exist
875// PRIMOSDK_BADPARAM if incorrect parameters
876// PRIMOSDK_UNITERROR if the unit reported a reading error
877// PRIMOSDK_BADHANDLE if dwHandle is not valid
878// PRIMOSDK_INTERR if an internal error occured
879//
880
881
882
883DWORD WINAPI PrimoSDK_GIInfo ( DWORD dwHandle, PBYTE szGIFileName, PDWORD pdwMediumFormat,
884 PDWORD pdwTracks, PDWORD pdwUsed );
885// =================
886//
887// Retrieve information about a Global Image file (.GI).(Use PrimoSDK_GIInfoEx instead.)
888//
889// Param: dwHandle is the operation handle
890//
891// szGIFileName is the Global Image file name
892//
893// pdwMediumFormat returns the disc format(if not NULL)
894// (see PrimoSDK_DiscInfo)
895//
896// pdwTracks number of tracks in the disc (if not NULL)
897//
898// pdwUsed total number of used sectors in the disc (if not NULL)
899//
900// Notes: Before starting any recording operation, the caller should check
901// the presence of blank discs in all engaged recorders.
902//
903// Return: PRIMOSDK_OK if no error
904// PRIMOSDK_CMDSEQUENCE if not yet initialized
905// PRIMOSDK_BADPARAM if incorrect parameters
906// PRIMOSDK_FILEERROR if szGIFileName is not found
907// PRIMOSDK_INVALIDSOURCE if the file is not a valid GI
908// PRIMOSDK_BADHANDLE if dwHandle is not valid
909// PRIMOSDK_INTERR if an internal error occured
910//
911
912
913DWORD WINAPI PrimoSDK_GIInfoEx ( DWORD dwHandle, PBYTE szGIFileName, PDWORD pdwMediumFormat,
914 PDWORD pdwTracks, PDWORD pdwUsed, PDWORD pdwMedium,
915 PDWORD pdwMediumEx );
916// =================
917//
918// Retrieve information about a Global Image file (.GI).
919//
920// Param: dwHandle is the operation handle
921//
922// szGIFileName is the Global Image file name
923//
924// pdwMediumFormat returns the disc format(if not NULL)
925// (see PrimoSDK_DiscInfo)
926//
927// pdwTracks number of tracks in the disc (if not NULL)
928//
929// pdwUsed total number of used sectors in the disc (if not NULL)
930//
931// pdwMedium media type GI was created from (if not NULL)
932// (see PrimoSDK_DiscInfo2)
933//
934// pdwMediumEx returns the physical type of the medium (if not NULL):
935// (see PrimoSDK_DiscInfo2)
936//
937// Notes: Before starting any recording operation, the caller should check
938// the presence of blank discs in all engaged recorders.
939//
940// Return: PRIMOSDK_OK if no error
941// PRIMOSDK_CMDSEQUENCE if not yet initialized
942// PRIMOSDK_BADPARAM if incorrect parameters
943// PRIMOSDK_FILEERROR if szGIFileName is not found
944// PRIMOSDK_INVALIDSOURCE if the file is not a valid GI
945// PRIMOSDK_BADHANDLE if dwHandle is not valid
946// PRIMOSDK_INTERR if an internal error occured
947//
948
949
950DWORD WINAPI PrimoSDK_TrackInfo ( DWORD dwHandle, DWORD dwTrackNumber,
951 PDWORD pdwSessionNumber, PDWORD pdwTrackType,
952 PDWORD pdwPreGap, PDWORD pdwStart, PDWORD pdwLength );
953// ====================
954//
955// Retrieve the information about a track.
956//
957// After a PrimoSDK_DiscInfo or a PrimoSDK_GIInfo has been performed, this
958// function will retrieve the type and some geometry information of a track.
959//
960// Param: dwHandle is the operation handle used to perform the PrimoSDK_DiscInfo
961// or the PrimoSDK_GIInfo
962//
963// dwTrackNumber is the number of the track to get info from, 1 is the first
964//
965// pdwSessionNumber returns the number of the session that contains the track
966//
967// pdwTrackType returns the type of the session the track, 0 if is Audio,
968// 1 if Data Mode1, 2 if data Mode2
969//
970// pdwPreGap returns the pre-gap in sector of the track
971//
972// pdwStart returns the start position in sector of the track
973//
974// pdwLength returns the length in sector of the track
975//
976// Notes: This function must be called only after having issued a PrimoSDK_DiscInfo
977// or a PrimoSDK_GIInfo.
978//
979// Return: PRIMOSDK_OK if no error
980// PRIMOSDK_CMDSEQUENCE if not yet initialized or PrimoSDK_DiscInfo/PrimoSDK_GIInfo
981// has not been called yet
982// PRIMOSDK_BADPARAM if dwTrackNumber is incorrect
983// PRIMOSDK_BADHANDLE if dwHandle is not valid
984// PRIMOSDK_INTERR if an internal error occured
985//
986
987
988
989DWORD WINAPI PrimoSDK_CDTextInfo ( DWORD dwHandle, PDWORD pdwUnit,
990 PBYTE szTitle, PBYTE szPerformer, PBYTE szComposer );
991// =====================
992//
993// Retrieve the (English) CD Text information about a disc.
994//
995// After a PrimoSDK_DiscInfo or a PrimoSDK_GIInfo has been performed, this
996// function will retrieve the CD Text information for the entire disc.
997//
998// Param: dwHandle is the operation handle used to perform the PrimoSDK_DiscInfo
999// or the PrimoSDK_GIInfo
1000//
1001// pdwUnit points to a DWORD containing the unit identification.
1002// (see PrimoSDK_UnitInfo for field format)
1003//
1004// szTitle points to a multiline string, where each line is divided by <CR><LF>;
1005// the 1st line is the Title for the disc, the 2nd for the 1st track, the
1006// 3rd line is the title of the 2nd track, and so on
1007//
1008// szPerformer is similar to szTitle, but it is for the Performer
1009//
1010// szComposer is similar to szTitle, but it is for the Composer
1011//
1012// Notes: This function must be called only after having issued a PrimoSDK_DiscInfo
1013// or a PrimoSDK_GIInfo. Please point to enough room in szTitle, szPerformer
1014// and szComposer. If this 3 fields return empty ("") then the disc does not
1015// have CD Text.
1016// A safe size for the buffers pointed by szTitle, szPerformer and szComposer
1017// is 2000 bytes each.
1018//
1019// Return: PRIMOSDK_OK if no error
1020// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
1021// PRIMOSDK_BADUNIT if the unit does not exist
1022// PRIMOSDK_BADPARAM if thye drive does not support CD Text
1023// PRIMOSDK_BADHANDLE if dwHandle is not valid
1024// PRIMOSDK_INTERR if an internal error occured
1025//
1026
1027
1028
1029DWORD WINAPI PrimoSDK_CDTextInfoEJ ( DWORD dwHandle, PDWORD pdwUnit,
1030 PBYTE szTitleE, PBYTE szPerformerE, PBYTE szComposerE,
1031 PBYTE szTitleJ, PBYTE szPerformerJ, PBYTE szComposerJ );
1032// =======================
1033//
1034// Retrieve the (English and Japanese) CD Text information about a disc.
1035//
1036// After a PrimoSDK_DiscInfo or a PrimoSDK_GIInfo has been performed, this
1037// function will retrieve the CD Text information for the entire disc.
1038//
1039// Param: dwHandle is the operation handle used to perform the PrimoSDK_DiscInfo
1040// or the PrimoSDK_GIInfo
1041//
1042// pdwUnit points to a DWORD containing the unit identification.
1043// (see PrimoSDK_UnitInfo for field format)
1044//
1045// szTitleE points to a multiline string, where each line is divided by <CR><LF>;
1046// the 1st line is the Title for the disc, the 2nd for the 1st track, the
1047// 3rd line is the title of the 2nd track, and so on. This is the English
1048// information
1049//
1050// szPerformerE is similar to szTitleE, but it is for the Performer
1051//
1052// szComposerE is similar to szTitleE, but it is for the Composer
1053//
1054// szTitleJ is similar to szTitleE, but it is for the Composer in Japanese
1055//
1056// szPerformerJ is similar to szTitleJ, but it is for the Performer
1057//
1058// szComposerJ is similar to szTitleJ, but it is for the Composer
1059//
1060// Notes: This function must be called only after having issued a PrimoSDK_DiscInfo
1061// or a PrimoSDK_GIInfo. Please point to enough room in szTitle, szPerformer
1062// and szComposer. If this 3 fields return empty ("") then the disc does not
1063// have CD Text. If the Japanese CD Text information is not present, then the
1064// relatine strings are returned empty.
1065// The Japanese strings are returned in Shift JIS (Double byte).
1066// A safe size for the buffers pointed by szTitle, szPerformer and szComposer
1067// is 2000 bytes each.
1068//
1069// Return: PRIMOSDK_OK if no error
1070// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
1071// PRIMOSDK_BADUNIT if the unit does not exist
1072// PRIMOSDK_BADPARAM if thye drive does not support CD Text
1073// PRIMOSDK_BADHANDLE if dwHandle is not valid
1074// PRIMOSDK_INTERR if an internal error occured
1075//
1076
1077
1078
1079DWORD WINAPI PrimoSDK_MoveMedium ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwFlags );
1080// =====================
1081//
1082// Open/Close the tray or eject the caddy.
1083//
1084// Param: dwHandle is the operation handle
1085//
1086// pdwUnit points to a DWORD containing the unit identification.
1087// (see PrimoSDK_UnitInfo for field format)
1088//
1089// dwFlags is PRIMOSDK_OPENTRAYEJECT to open/eject the tray/caddy and
1090// PRIMOSDK_CLOSETRAY to close the tray (does nothing if caddy).
1091// Use also PRIMOSDK_IMMEDIATE if you want to have back the control
1092// without waiting that the drive completes the operation
1093//
1094// Notes: If no PRIMOSDK_OPENTRAYEJECT nor PRIMOSDK_CLOSETRAY is selected, this
1095// function will only stop the drive; therefore, if you call PrimoSDK_MoveMedium
1096// only with PRIMOSDK_IMMEDIATE you start to stop the rotation without
1097// waiting; a subsequent full eject command will open the tray immediately.
1098//
1099// Return: PRIMOSDK_OK if no error
1100// PRIMOSDK_CMDSEQUENCE if not yet initialized
1101// PRIMOSDK_BADUNIT if the unit does not exist
1102// PRIMOSDK_BADPARAM if incorrect parameters
1103// PRIMOSDK_NOTREADY if the unit is not ready to move the tray
1104// PRIMOSDK_BADHANDLE if dwHandle is not valid
1105// PRIMOSDK_INTERR if an internal error occured
1106//
1107
1108
1109
1110DWORD WINAPI PrimoSDK_UnitAIN ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwFlags );
1111// ==================
1112//
1113// Block/Unblock the Auto Insert Notification and the File System activity.
1114//
1115// Param: dwHandle is the operation handle
1116//
1117// pdwUnit points to a DWORD containing the unit identification.
1118// (see PrimoSDK_UnitInfo for field format)
1119//
1120// dwFlags is PRIMOSDK_LOCK to block or PRIMOSDK_UNLOCK to unblock the
1121// file system activity
1122// PRIMOSDK_FORCE_REFRESH can also be specified to force
1123// the OS to refresh the media after the lock/unlock
1124//
1125// Note: when the activity is blocked on a drive, every other user operations
1126// return that the unit is not ready. The only operations allowed
1127// by this filtering are the ones made by PrimoSDK.
1128// It is mandatory that the Auto Insert Notification is stopped on the
1129// recording drives, as well as any other kind of access not performed
1130// by PrimoSDK.
1131// The blocking is actuated by the PxHelper driver; this function
1132// will return an error when running under WinASPI.
1133//
1134// Return: PRIMOSDK_OK if no error
1135// PRIMOSDK_CMDSEQUENCE if not yet initialized
1136// PRIMOSDK_BADUNIT if the unit does not exist
1137// PRIMOSDK_BADPARAM if incorrect parameters
1138// PRIMOSDK_NOAINCONTROL if the AIN control did not activated; this
1139// usually happen when running under WinASPI instead of PxHelper
1140// PRIMOSDK_BADHANDLE if dwHandle is not valid
1141// PRIMOSDK_INTERR if an internal error occured
1142//
1143
1144
1145
1146DWORD WINAPI PrimoSDK_UnitVxBlock ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwFlags,
1147 PBYTE szAppName );
1148// ======================
1149//
1150// Inquiry or Reserve/Release a drive using the VxBlock.dll mechanism.
1151//
1152// Param: dwHandle is the operation handle
1153//
1154// pdwUnit points to a DWORD containing the unit identification.
1155// (see PrimoSDK_UnitInfo for field format)
1156//
1157// dwFlags can be PRIMOSDK_TEST to Inquiry the VxBlock status of the drive,
1158// or PRIMOSDK_LOCK to Reserve it or PRIMOSDK_UNLOCK to Release it
1159//
1160// szAppName will receive the string set by the application that reserved the
1161// drive if dwFlags was PRIMOSDK_TEST and the result is PRIMOSDK_NOTREADY.
1162// If dwFlags is PRIMOSDK_LOCK or PRIMOSDK_UNLOCK this string is used to
1163// pass the string that the application sets while reserving the drive.
1164// Use NULL to either not receive or not pass the string.
1165//
1166// Note: this works only when the VxBlock.dll has been installed in the system.
1167// Remember to pass again at PRIMOSDK_UNLOCK the very same string that
1168// has been used at PRIMOSDK_LOCK. szAppName must be long enough when
1169// Inquiring (256 bytes suggested)
1170//
1171// Return: PRIMOSDK_OK if dwFlags was PRIMOSDK_TEST and the drive is not already
1172// reserved, or if dwFlags was PRIMOSDK_LOCK and drive was reserved
1173// successfully (szAppName should be loaded with the string
1174// identifying who is reserving when dwFlags is PRIMOSDK_LOCK or
1175// PRIMOSDK_UNLOCK)
1176// PRIMOSDK_CMDSEQUENCE if not yet initialized
1177// PRIMOSDK_BADUNIT if the unit does not exist
1178// PRIMOSDK_BADPARAM if incorrect parameters
1179// PRIMOSDK_INCOMPATIBLE if VxBlock.dll is not installed
1180// PRIMOSDK_NOTREADY if dwFlags was PRIMOSDK_TEST or PRIMOSDK_LOCK and the drive
1181// was already reserved (szAppName is loaded with the string of who reserved)
1182// PRIMOSDK_BADHANDLE if dwHandle is not valid
1183// PRIMOSDK_INTERR if an internal error occured
1184//
1185
1186
1187
1188DWORD WINAPI PrimoSDK_UnitLock ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwFlags );
1189// ===================
1190//
1191// Lock/Unlock the tray or the caddy.
1192//
1193// Param: dwHandle is the operation handle
1194//
1195// pdwUnit points to a DWORD containing the unit identification.
1196// (see PrimoSDK_UnitInfo for field format)
1197//
1198// dwFlags is PRIMOSDK_LOCK to lock or PRIMOSDK_UNLOCK to unlock
1199//
1200// Note: a good implementation should lock the units before starting to record
1201// and it remembers to unlock when the operation finishes, wathever path
1202// in the code is taken.
1203//
1204// Return: PRIMOSDK_OK if no error
1205// PRIMOSDK_CMDSEQUENCE if not yet initialized
1206// PRIMOSDK_BADUNIT if the unit does not exist
1207// PRIMOSDK_BADPARAM if incorrect parameters
1208// PRIMOSDK_BADHANDLE if dwHandle is not valid
1209// PRIMOSDK_INTERR if an internal error occured
1210//
1211
1212
1213
1214DWORD WINAPI PrimoSDK_EraseMedium ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwFlags );
1215// ======================
1216//
1217// Erase a rewritable disc.
1218//
1219// This function returns immediately and continues asynchronously. The caller
1220// should use the PrimoSDK_RunningStatus to control the operations.
1221//
1222// Param: dwHandle is the operation handle
1223//
1224// pdwUnit points to a DWORD containing the unit identification.
1225// (see PrimoSDK_UnitInfo for field format)
1226//
1227// dwFlags is PRIMOSDK_ERASEQUICK for a fast erase (only the TOC) or
1228// PRIMOSDK_ERASEFULL for a complete erase or
1229// PRIMOSDK_ERASELAST to erase the last session, where available
1230//
1231// Notes: None.
1232//
1233// Return: PRIMOSDK_OK if no error
1234// PRIMOSDK_CMDSEQUENCE if not yet initialized
1235// PRIMOSDK_BADUNIT if the unit does not exist
1236// PRIMOSDK_BADPARAM if incorrect parameters
1237// PRIMOSDK_BADHANDLE if dwHandle is not valid
1238// PRIMOSDK_INTERR if an internal error occured
1239//
1240
1241
1242
1243DWORD WINAPI PrimoSDK_CopyDisc ( DWORD dwHandle, PDWORD pdwUnits, PDWORD pdwUnitSource,
1244 DWORD dwFlags, DWORD dwSpeed );
1245// ===================
1246//
1247// Copies an entire disc, from a source disc to one or more recorders.
1248//
1249// This function returns immediately and continues asynchronously. The caller
1250// should use the PrimoSDK_RunningStatus to control the operations.
1251// The pdwUnits units must contain a blank disc and the pdwUnitSource unit must
1252// contain a valid disc to copy.
1253//
1254// Param: dwHandle is the operation handle
1255//
1256// pdwUnits points to a vector of DWORD containing the units identification,
1257// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
1258//
1259// pdwUnitSource points the source unit identification
1260// (see PrimoSDK_UnitInfo for field format)
1261//
1262// dwFlags is (OR the following values if more than one):
1263// PRIMOSDK_WRITE for real recording or PRIMOSDK_TEST for test
1264// PRIMOSDK_COPYPREGAP to copy the Pre-gaps of audio tracks or
1265// PRIMOSDK_NOPREGAP to not copy the Pre-gaps
1266// PRIMOSDK_BURNPROOF if enable the BURN-Proof support if available
1267// PRIMOSDK_HIGHDENSITY enable writing in high-density mode (valid if the source is high-density)
1268// PRIMOSDK_CLOSEDISC if the disc must be closed anyway
1269// PRIMOSDK_VNR_WRITE to write to disc using Verify Not Required mode if supported by the drive
1270//
1271// dwSpeed defines the speed to use for recording:
1272// PRIMOSDK_MAX or n (like 8 for 8x) or PRIMOSDK_BEST if the drive supports AWS
1273//
1274// Notes: The caller must check the number of free blocks on the destination disc
1275// against the total blocks of the source, using PrimoSDK_DiscInfo, before
1276// calling this function. PrimoSDK will try to overburn if you try to copy
1277// more sectors than the available declared in the medium.
1278// If you select a speed that is not supported by the selected recorder
1279// the closest slower one is set.
1280// This function will return PRIMOSDK_BADPARAM when trying to test on a
1281// DVD+R, DVD+RW or DVD+RAM.
1282//
1283// Return: PRIMOSDK_OK if no error
1284// PRIMOSDK_CMDSEQUENCE if not yet initialized or if another operation
1285// is already in progress using the same handle
1286// PRIMOSDK_BADUNIT if the unit does not exist
1287// PRIMOSDK_BADPARAM if incorrect parameters
1288// PRIMOSDK_NOTREADY if the recorder or the source is not ready
1289// PRIMOSDK_INVALIDSOURCE if the source does not contain a valid
1290// disc to copy
1291// PRIMOSDK_INCOMPATIBLE if the type of disc is not compatible with
1292// the capabilities of the recorder
1293// PRIMOSDK_ITSADEMO if trying to record more than permitted with a Demo version
1294// PRIMOSDK_BADHANDLE if dwHandle is not valid
1295// PRIMOSDK_INTERR if an internal error occured
1296//
1297
1298
1299
1300DWORD WINAPI PrimoSDK_ReadGI ( DWORD dwHandle, PDWORD pdwUnitSource,
1301 PBYTE szGIFileName, DWORD dwFlags );
1302// =================
1303//
1304// Copies an entire disc, from a source unit to a Global Image.
1305//
1306// This function returns immediately and continues asynchronously. The caller
1307// should use the PrimoSDK_RunningStatus to control the operations.
1308// The unit must contain a valid disc to copy.
1309//
1310// Param: dwHandle is the operation handle
1311//
1312// pdwUnitSource points the source unit identification
1313// (see PrimoSDK_UnitInfo for field format)
1314//
1315// szGIFileName is the file name where to store the GI
1316//
1317// dwFlags is:
1318// PRIMOSDK_COPYPREGAP to read the Pre-gaps of audio tracks or
1319// PRIMOSDK_NOPREGAP to not read the Pre-gaps
1320//
1321// Notes: None.
1322//
1323// Return: PRIMOSDK_OK if no error
1324// PRIMOSDK_CMDSEQUENCE if not yet initialized or if another operation
1325// is already in progress using the same handle
1326// PRIMOSDK_BADUNIT if the unit does not exist
1327// PRIMOSDK_BADPARAM if incorrect parameters
1328// PRIMOSDK_NOTREADY if the source unit is not ready
1329// PRIMOSDK_INVALIDSOURCE if the source does not contain a valid
1330// disc to read
1331// PRIMOSDK_BADHANDLE if dwHandle is not valid
1332// PRIMOSDK_INTERR if an internal error occured
1333//
1334
1335
1336
1337DWORD WINAPI PrimoSDK_WriteGI ( DWORD dwHandle, PDWORD pdwUnits, PBYTE szGIFileName,
1338 DWORD dwFlags, DWORD dwSpeed );
1339// ==================
1340//
1341// Writes a Global Image to one or more recorders.
1342//
1343// This function returns immediately and continues asynchronously. The caller
1344// should use the PrimoSDK_RunningStatus to control the operations.
1345// The units must contain a blank disc.
1346//
1347// Param: dwHandle is the operation handle
1348//
1349// pdwUnits points to a vector of DWORD containing the units identification,
1350// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
1351//
1352// szGIFileName is the file name where is stored the GI
1353//
1354// dwFlags can be PRIMOSDK_WRITE for real recording or PRIMOSDK_TEST for test
1355// PRIMOSDK_BURNPROOF if enable the BURN-Proof support if available
1356// PRIMOSDK_HIGHDENSITY enable writing in high-density mode
1357// PRIMOSDK_VNR_WRITE to write to disc using Verify Not Required mode if supported by the drive
1358//
1359// dwSpeed defines the speed to use for recording:
1360// PRIMOSDK_MAX or n (like 8 for 8x) or PRIMOSDK_BEST if the drive supports AWS
1361//
1362// Notes: This function will return PRIMOSDK_BADPRAM when trying to test on a
1363// DVD+R, DVD+RW or DVD+RAM.
1364//
1365// Return: PRIMOSDK_OK if no error
1366// PRIMOSDK_CMDSEQUENCE if not yet initialized or if another operation
1367// is already in progress using the same handle
1368// PRIMOSDK_BADUNIT if the unit does not exist
1369// PRIMOSDK_BADPARAM if incorrect parameters
1370// PRIMOSDK_NOTREADY if the recorder is not ready
1371// PRIMOSDK_FILEERROR if szGIFileName is not found
1372// PRIMOSDK_INVALIDSOURCE if the file is not a valid GI
1373// PRIMOSDK_INVALIDMEDIUM if the target disc is not blank
1374// PRIMOSDK_INCOMPATIBLE if the type of disc store in the GI
1375// is not compatible with the capabilities of the recorder
1376// PRIMOSDK_ITSADEMO if trying to record more than permitted with a Demo version
1377// PRIMOSDK_BADHANDLE if dwHandle is not valid
1378// PRIMOSDK_INTERR if an internal error occured
1379//
1380
1381
1382
1383DWORD WINAPI PrimoSDK_WriteOtherCDImage ( DWORD dwHandle, PDWORD pdwUnits, PBYTE szFileName,
1384 DWORD dwFlags, DWORD dwSpeed );
1385// ============================
1386//
1387// Writes a generic CD image to one or more recorders.
1388//
1389// This function returns immediately and continues asynchronously. The caller
1390// should use the PrimoSDK_RunningStatus to control the operations.
1391// The units must contain a blank disc.
1392//
1393// Param: dwHandle is the operation handle
1394//
1395// pdwUnits points to a vector of DWORD containing the units identification,
1396// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
1397//
1398// szFileName is the file name where is stored the CD image.
1399//
1400// dwFlags can be PRIMOSDK_WRITE for real recording or PRIMOSDK_TEST for test
1401// PRIMOSDK_SAO : (default) if the image should be written SAO mode.
1402// PRIMOSDK_TAO : if the image should be written TAO mode; you may use this flag
1403// to append more ISO tracks to a disc, if the disc is not closed.
1404// PRIMOSDK_BURNPROOF if enable the BURN-Proof support if available
1405// PRIMOSDK_HIGHDENSITY enable writing in high-density mode
1406// PRIMOSDK_VNR_WRITE to write to disc using Verify Not Required mode if supported by the drive
1407// PRIMOSDK_CLOSEDISC if the disc must be closed so no other session could
1408// be added
1409// PRIMOSDK_IMAGE_M1_2048 to record an image in Mode 1 with a block
1410// length of 2048 bytes, or
1411// PRIMOSDK_IMAGE_M2_2336 to record an image in Mode 2 with a block
1412// length of 2336 bytes, or
1413// PRIMOSDK_IMAGE_M2_2352 to record an image in Mode 2 with a block
1414// length of 2352 bytes
1415//
1416// dwSpeed defines the speed to use for recording:
1417// PRIMOSDK_MAX or n (like 8 for 8x) or PRIMOSDK_BEST if the drive supports AWS
1418//
1419// Notes: Use this function to record an ISO image made with PrimoSDK_SaveGI, passing
1420// the parameters PRIMOSDK_IMAGE_M1_2048.
1421// This image must NOT be in a Global Image (.GI) file (use the PrimoSDK_WriteGI
1422// function to record GIs) but in any other format.
1423// Pay attention that the use of wrong parameters, not fitting the
1424// image, can lead to unusable discs.
1425// This function will return PRIMOSDK_BADPRAM when trying to test on a
1426// DVD+R, DVD+RW or DVD+RAM.
1427//
1428// Return: PRIMOSDK_OK if no error
1429// PRIMOSDK_CMDSEQUENCE if not yet initialized or if another operation
1430// is already in progress using the same handle
1431// PRIMOSDK_BADUNIT if the unit does not exist
1432// PRIMOSDK_BADPARAM if incorrect parameters
1433// PRIMOSDK_NOTREADY if the recorder is not ready
1434// PRIMOSDK_FILEERROR if szFileName is not found
1435// PRIMOSDK_INVALIDMEDIUM if the target disc is not blank
1436// PRIMOSDK_ITSADEMO if trying to record more than permitted with a Demo version
1437// PRIMOSDK_BADHANDLE if dwHandle is not valid
1438// PRIMOSDK_INTERR if an internal error occured
1439//
1440
1441
1442
1443DWORD WINAPI PrimoSDK_VerifyDisc ( DWORD dwHandle, PDWORD pdwUnits,
1444 PDWORD pdwUnitSource, DWORD dwSpeed );
1445// =====================
1446//
1447// Verifies an entire source disc against one or more written discs.
1448//
1449// The pdwUnits units must contain the disc that must be verified against the discs
1450// in pdwUnitSource.
1451//
1452// This function returns immediately and continues asynchronously. The caller
1453// should use the PrimoSDK_RunningStatus to control the operations.
1454//
1455// Param: dwHandle is the operation handle
1456//
1457// pdwUnits points to a vector of DWORD containing the units identification,
1458// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
1459//
1460// pdwUnitSource points the source unit identification
1461// (see PrimoSDK_UnitInfo for field format)
1462//
1463// dwSpeed defines the speed to use for recording:
1464// PRIMOSDK_MAX or n (like 8 for 8x)
1465//
1466// Notes: The discs geometry is verified first. Then the verification continues byte
1467// per byte on every track; for the audio tracks where, because of the
1468// absence of error correction in the Red Book standard an absolute verification
1469// is impossible, a special proprietary algorithm is applied.
1470// The PrimoSDK_UnitStatus reports PRIMOSDK_UNITERROR if a drive fails the
1471// verification; the other parametrs of PrimoSDK_UnitStatus, as pCommnad,
1472// pSense, pASC and pASCQ are all set to 0.
1473//
1474// Return: PRIMOSDK_OK if no error
1475// PRIMOSDK_CMDSEQUENCE if not yet initialized or if another operation
1476// is already in progress using the same handle
1477// PRIMOSDK_BADUNIT if the unit does not exist
1478// PRIMOSDK_BADPARAM if incorrect parameters
1479// PRIMOSDK_NOTREADY if the recorder or the source are not ready or
1480// if the recorders contain blanks
1481// PRIMOSDK_INVALIDSOURCE if the source does not contain a valid
1482// disc to verify
1483// PRIMOSDK_BADHANDLE if dwHandle is not valid
1484// PRIMOSDK_INTERR if an internal error occured
1485//
1486
1487
1488
1489DWORD WINAPI PrimoSDK_VerifyGI ( DWORD dwHandle, PDWORD pdwUnits,
1490 PBYTE szGIFileName, DWORD dwSpeed );
1491// ===================
1492//
1493// Verifies a Global Image file (.GI) against one or more written discs.
1494// The szFileName contain the image of the disc that must be verified against the
1495// CD in pdwUnitSource.
1496//
1497// This function returns immediately and continues asynchronously. The caller
1498// should use the PrimoSDK_RunningStatus to control the operations.
1499//
1500// Param: dwHandle is the operation handle
1501//
1502// pdwUnits points to a vector of DWORD containing the units identification,
1503// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
1504//
1505// szGIFileName is the file name where is stored the GI
1506//
1507// dwSpeed defines the speed to use for verifing:
1508// PRIMOSDK_MAX or n (like 8 for 8x)
1509//
1510// Notes: The discs geometry is verified first. Then the verification continues
1511// byte by byte on every sector of the data tracks; for the audio tracks
1512// (where, because of the absence of error correction in the Red Book standard,
1513// a total verification is impossible) a special proprietary algorithm is
1514// applied.
1515// The PrimoSDK_UnitStatus reports PRIMOSDK_UNITERROR if a drive fails the
1516// verification; the other parametrs of PrimoSDK_UnitStatus, as pCommnad,
1517// pSense, pASC and pASCQ are all set to 0.
1518//
1519// Return: PRIMOSDK_OK if no error
1520// PRIMOSDK_CMDSEQUENCE if not yet initialized or if another operation
1521// is already in progress using the same handle
1522// PRIMOSDK_BADUNIT if the unit does not exist
1523// PRIMOSDK_BADPARAM if incorrect parameters
1524// PRIMOSDK_NOTREADY if the recorder or the source are not ready or
1525// if the recorders contain blanks
1526// PRIMOSDK_FILEERROR if szGIFileName is not found
1527// PRIMOSDK_INVALIDSOURCE if the file is not a valid GI
1528// PRIMOSDK_INCOMPATIBLE if the type of disc is not compatible with
1529// the capabilities of the recorder
1530// PRIMOSDK_BADHANDLE if dwHandle is not valid
1531// PRIMOSDK_INTERR if an internal error occured
1532//
1533
1534
1535
1536DWORD WINAPI PrimoSDK_VerifyOtherCDImage ( DWORD dwHandle, PDWORD pdwUnits,
1537 PBYTE szFileName, DWORD dwFlags, DWORD dwSpeed );
1538// =============================
1539//
1540// Verifies a generic CD image against one or more recorders.
1541//
1542// This function returns immediately and continues asynchronously. The caller
1543// should use the PrimoSDK_RunningStatus to control the operations.
1544//
1545// Param: dwHandle is the operation handle
1546//
1547// pdwUnits points to a vector of DWORD containing the units identification,
1548// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
1549//
1550// szFileName is the file name where is stored the CD image.
1551//
1552// dwFlags can be
1553// PRIMOSDK_IMAGE_M1_2048 to verify an image in Mode 1 with a block
1554// length of 2048 bytes, or
1555// PRIMOSDK_IMAGE_M2_2336 to verify an image in Mode 2 with a block
1556// length of 2336 bytes, or
1557// PRIMOSDK_IMAGE_M2_2352 to verify an image in Mode 2 with a block
1558// length of 2352 bytes
1559//
1560// dwSpeed defines the speed to use for verifing:
1561// PRIMOSDK_MAX or n (like 8 for 8x)
1562//
1563// Notes: The PrimoSDK_UnitStatus reports PRIMOSDK_UNITERROR if a drive fails the
1564// verification; the other parametrs of PrimoSDK_UnitStatus, as pCommnad,
1565// pSense, pASC and pASCQ are all set to 0.
1566//
1567// Return: PRIMOSDK_OK if no error
1568// PRIMOSDK_CMDSEQUENCE if not yet initialized or if another operation
1569// is already in progress using the same handle
1570// PRIMOSDK_BADUNIT if the unit does not exist
1571// PRIMOSDK_BADPARAM if incorrect parameters
1572// PRIMOSDK_NOTREADY if the recorder or the source are not ready or
1573// if the recorders contain blanks
1574// PRIMOSDK_FILEERROR if szFileName is not found
1575// PRIMOSDK_INCOMPATIBLE if the type of disc is not compatible with
1576// the capabilities of the recorder
1577// PRIMOSDK_BADHANDLE if dwHandle is not valid
1578// PRIMOSDK_INTERR if an internal error occured
1579//
1580
1581
1582
1583DWORD WINAPI PrimoSDK_CloseImage ( DWORD dwHandle );
1584// =====================
1585//
1586// Close and destroy the "CD Image".
1587//
1588// This function must always be called after a PrimoSDK_NewImage, to terminate
1589// and free the allocated structures.
1590//
1591// Param: dwHandle is the operation handle
1592//
1593// Notes: None.
1594//
1595// Return: PRIMOSDK_OK if no error
1596// PRIMOSDK_CMDSEQUENCE if not yet initialized or no CD Image started
1597// PRIMOSDK_BADHANDLE if dwHandle is not valid
1598// PRIMOSDK_INTERR if an internal error occured
1599//
1600
1601
1602
1603DWORD WINAPI PrimoSDK_AddFolder ( DWORD dwHandle, PBYTE szFolder );
1604// ====================
1605//
1606// Add a folder to the "CD Image".
1607//
1608// The folder must always be fully specified. Therefore, when adding a subfolder also
1609// the parent is specified. This function adds only one level at a time.
1610// For example, to create the path "\My Folder\My Sub Folder" and the path
1611// "\My Folder\My Second Sub Folder", that is:
1612//
1613// \My Folder
1614// \My Sub Folder
1615// \My Second Sub Folder
1616//
1617// The calls to this function should be:
1618//
1619// PrimoSDK_AddFolder(dwHandle,"\My Folder");
1620// PrimoSDK_AddFolder(dwHandle,"\My Folder\My Sub Folder");
1621// PrimoSDK_AddFolder(dwHandle,"\My Folder\My Second Sub Folder");
1622//
1623// Param: dwHandle is the operation handle
1624//
1625// szFolder specifies the folder name in MBCS
1626//
1627// Notes: If PRIMOSDK_ISOLEVEL1 is specified, the folder must not have
1628// any extension; it can be just up to 8 char.
1629// The first backslash is mandatory. A trailer backslash
1630// is optional. There is no need to create the root folder.
1631//
1632// Return: PRIMOSDK_OK if no error
1633// PRIMOSDK_CMDSEQUENCE if not yet initialized or, CD Image started or
1634// if (only if PrimoSDK_NewImage was called with PRIMOSDK_CHECKDUPLI)
1635// the nested folders have not been added yet
1636// PRIMOSDK_BADPARAM if incorrect or too long folder name
1637// PRIMOSDK_ALREADYEXIST if the folder has been already added
1638// (only if PrimoSDK_NewImage was called with PRIMOSDK_CHECKDUPLI)
1639// PRIMOSDK_BADHANDLE if dwHandle is not valid
1640// PRIMOSDK_NOSPACE if the internal tables went in overflow (too many
1641// files for the system memory)
1642// PRIMOSDK_INTERR if an internal error occured
1643//
1644
1645
1646
1647DWORD WINAPI PrimoSDK_AddFile ( DWORD dwHandle, PBYTE szFileOnCD, PBYTE szSourceFile );
1648// ==================
1649//
1650// Add szSourceFile to the "CD Image" with the name szFileOnCD.
1651//
1652// Both files must be fully specified, and the folder must already exist.
1653// For example:
1654//
1655// PrimoSDK_AddFile(dwHandle,"\My File.Txt","D:\Source\My File.Txt")
1656// adds the file "My File.Txt" that is stored in "D:\Source"
1657// to the CD root, with the same name.
1658//
1659// PrimoSDK_AddFile(dwHandle,"\My Folder\Your File.Txt","D:\Source\My File.Txt")
1660// adds the same file to the "\My Folder" on the CD, with
1661// the new name "Your File.Txt". "\My Folder" must have been already
1662// added to the CD Image with a previous call to PrimoSDK_AddFolder.
1663//
1664// Param: dwHandle is the operation handle
1665//
1666// szFileOnCD specifies the file name on CD in MBCS
1667//
1668// szSourceFile specifies the source file name
1669//
1670// Notes: None.
1671//
1672// Return: PRIMOSDK_OK if no error
1673// PRIMOSDK_CMDSEQUENCE if not yet initialized, no CD Image started or
1674// if (only if PrimoSDK_NewImage was called with PRIMOSDK_CHECKDUPLI)
1675// the nested folders have not been added yet
1676// PRIMOSDK_BADPARAM if incorrect or too long file name
1677// PRIMOSDK_ALREADYEXIST if szFileOnCD name has been already added
1678// (only if PrimoSDK_NewImage was called with PRIMOSDK_CHECKDUPLI)
1679// PRIMOSDK_NOTREADABLE if the source file is not found or not readable
1680// PRIMOSDK_FILEERROR if a file that was added is invalid
1681// PRIMOSDK_BADHANDLE if dwHandle is not valid
1682// PRIMOSDK_NOSPACE if the internal tables went in overflow (too many
1683// files for the system memory)
1684// PRIMOSDK_INTERR if an internal error occured
1685// PRIMOSDK_FILETOOLARGE if a file that was added is bigger than 9.99 GB for UDF
1686// or bigger than 4 GB for ISO.
1687//
1688
1689
1690
1691DWORD WINAPI PrimoSDK_AddBootable ( DWORD dwHandle, PBYTE szBootImageFile, DWORD dwFlags );
1692// ======================
1693//
1694// Add the bootable "El Torito" standard feature.
1695//
1696// This funcxtion must be called after having added all the folders and files, providing
1697// the floppy boot image.
1698//
1699// Param: dwHandle is the operation handle
1700//
1701// szBootImageFile specifies the floppy disc boot image
1702//
1703// dwFlags can be the value PRIMOSDK_FLOPPY144 for 1.44 floppy images
1704// or the value PRIMOSDK_FLOPPY288 for 2.88 floppy images
1705// or the value PRIMOSDK_FLOPPY12 for 1.2 floppy images
1706// or the value PRIMOSDK_HD for Hard Drive images
1707// or the value PRIMOSDK_NOEMULATION for a special boot image
1708// which uses a private loader
1709//
1710// Return: PRIMOSDK_OK if no error
1711// PRIMOSDK_CMDSEQUENCE if not yet initialized or no CD Image started
1712// PRIMOSDK_BADPARAM if incorrect parameters
1713// PRIMOSDK_NOTREADABLE if the boot image file is not found or not readable
1714// PRIMOSDK_BADHANDLE if dwHandle is not valid
1715// PRIMOSDK_INTERR if an internal error occured
1716//
1717
1718DWORD WINAPI PrimoSDK_AddBootableEx ( DWORD dwHandle, PBYTE szBootImageFile, DWORD dwFlags,
1719 DWORD dwSize, DWORD reserved);
1720// ========================
1721//
1722// Add the bootable "El Torito" standard feature. Additional parameters for the Boot Info Table
1723//
1724// This function must be called after having added all the folders and files, providing
1725// the floppy boot image.
1726//
1727// Param: dwHandle is the operation handle
1728//
1729// szBootImageFile specifies the boot image
1730//
1731// dwFlags can be the value PRIMOSDK_FLOPPY144 for 1.44 floppy images
1732// or the value PRIMOSDK_FLOPPY288 for 2.88 floppy images
1733// or the value PRIMOSDK_FLOPPY12 for 1.2 floppy images
1734// or the value PRIMOSDK_HD for Hard Drive images
1735// or the value PRIMOSDK_NOEMULATION for a special boot image
1736// or the value PRIMOSDK_NOEMULATION_WITH_SET_BOOT_INFO for a special boot image
1737// which uses a private loader. Also writes the Boot Info table into boot image.
1738//
1739// dwSize is the size of the boot image file (for use with
1740// PRIMOSDK_NOEMULATION_WITH_SET_BOOT_INFO).
1741// If dwSize is zero, then boot size will be calculated from the length of the
1742// boot image file specified by szBootImageFile.
1743//
1744// Return: PRIMOSDK_OK if no error
1745// PRIMOSDK_CMDSEQUENCE if not yet initialized or no CD Image started
1746// PRIMOSDK_BADPARAM if incorrect parameters
1747// PRIMOSDK_NOTREADABLE if the boot image file is not found or not readable
1748// PRIMOSDK_BADHANDLE if dwHandle is not valid
1749// PRIMOSDK_INTERR if an internal error occured
1750//
1751
1752DWORD WINAPI PrimoSDK_WriteImage ( DWORD dwHandle, DWORD dwFlags,
1753 DWORD dwSpeed, PDWORD pdwSize );
1754// =====================
1755//
1756// Start the write (or test) of the "CD Image".
1757//
1758// This function returns immediately and continues asynchronously. The caller
1759// should use the PrimoSDK_RunningStatus to control the operations.
1760//
1761// Param: dwHandle is the operation handle
1762//
1763// dwFlags can be PRIMOSDK_WRITE for real recording or PRIMOSDK_TEST for test
1764// PRIMOSDK_BURNPROOF if enable the BURN-Proof support if available
1765// PRIMOSDK_HIGHDENSITY enable writing in high-density mode
1766// PRIMOSDK_DVDPRQUICK to not force 30mm Lead Out when recording DVD+R disc
1767// PRIMOSDK_ALLOW_NONSTANDARD_LAYER to allow non-compliant layer break on DVD Video
1768// PRIMOSDK_FAST_WRITE to make drive write file data without read-after-write
1769// PRIMOSDK_VNR_WRITE to write to disc using Verify Not Required mode if supported by the drive
1770//
1771// dwSpeed defines the speed to use for recording:
1772// PRIMOSDK_MAX or n (like 8 for 8x) or PRIMOSDK_BEST if the drive supports AWS
1773//
1774// pdwSize returns the total sectors required for this CD Image
1775//
1776// Notes: This function can be called more than once, to generate many CD copies,
1777// after the files have been added, and before calling the PrimoSDK_CloseImage.
1778// This function will return PRIMOSDK_BADPRAM when trying to test on a
1779// DVD+R, DVD+RW or DVD+RAM.
1780//
1781// Return: PRIMOSDK_OK if no error
1782// PRIMOSDK_CMDSEQUENCE if not yet initialized or no CD Image started
1783// or the CD Image is empty
1784// PRIMOSDK_BADPARAM if incorrect parameters to this function or if
1785// no units have been passed to PrimoSDK_NewImage
1786// PRIMOSDK_NOTREADY if the unit is not ready
1787// PRIMOSDK_TMPOVERFLOW if a temporary file goes in overflow
1788// PRIMOSDK_NOSPACE if the medium does not have enough free sectors
1789// PRIMOSDK_DVDSTRUCTERROR if the passed VIDEO_TS or AUDIO_TS structure
1790// do not respectthe DVD-Video or DVD-Audio rules (DVD version only)
1791// PRIMOSDK_ITSADEMO if trying to record more than permitted with a Demo version
1792// PRIMOSDK_FILEERROR if a file that was added is no longer found
1793// PRIMOSDK_BADHANDLE if dwHandle is not valid
1794// PRIMOSDK_INTERR if an internal error occured
1795//
1796//
1797//
1798
1799
1800
1801DWORD WINAPI PrimoSDK_VerifyImage ( DWORD dwHandle, DWORD dwSpeed );
1802// =====================
1803//
1804// Start the verify of the "CD Image".
1805//
1806// This function returns immediately and continues asynchronously. The caller
1807// should use the PrimoSDK_RunningStatus to control the operations.
1808//
1809// Param: dwHandle is the operation handle
1810//
1811// dwSpeed defines the speed to use for verifying:
1812// PRIMOSDK_MAX or n (like 8 for 8x)
1813//
1814// Notes: This function can be called after a PrimoSDK_WriteImage
1815// and before calling the PrimoSDK_CloseImage.
1816//
1817// Return: PRIMOSDK_OK if no error
1818// PRIMOSDK_CMDSEQUENCE if not yet initialized or no CD Image started
1819// or the CD Image is empty
1820// PRIMOSDK_BADPARAM if incorrect parameters to this function or if
1821// no units have been passed to PrimoSDK_NewImage
1822// PRIMOSDK_NOTREADY if the unit is not ready
1823// PRIMOSDK_TMPOVERFLOW if a temporary file goes in overflow
1824// PRIMOSDK_DVDSTRUCTERROR if the passed VIDEO_TS or AUDIO_TS structure
1825// do not respectthe DVD-Video or DVD-Audio rules (DVD version only)
1826// PRIMOSDK_FILEERROR if a file that was added is no longer found
1827// PRIMOSDK_BADHANDLE if dwHandle is not valid
1828// PRIMOSDK_INTERR if an internal error occured
1829//
1830//
1831//
1832
1833
1834
1835DWORD WINAPI PrimoSDK_SaveGI ( DWORD dwHandle, PBYTE szGIFileName, PDWORD pdwSize );
1836// =================
1837//
1838// Writes the CD Image to a Global Image file.
1839//
1840// This function builds a Global Image corresponding to the files added.
1841// The image can later be recorded using PrimoSDK_WriteGI to a blank disc.
1842// This function returns immediately and continues asynchronously. The caller
1843// should use the PrimoSDK_RunningStatus to control the operations.
1844//
1845// Param: dwHandle is the operation handle
1846//
1847// szGIFileName is the file name where to write the Global Image
1848//
1849// pdwSize returns the total sectors required for this CD Image
1850// (the file will be slightly bigger than that, around 100K more)
1851//
1852// Notes: This function does not engage any recorder.
1853//
1854// Return: PRIMOSDK_OK if no error
1855// PRIMOSDK_CMDSEQUENCE if not yet initialized or no CD Image started
1856// or the CD Image is empty
1857// PRIMOSDK_BADPARAM if incorrect parameters
1858// PRIMOSDK_TMPOVERFLOW if a temporary file goes in overflow
1859// PRIMOSDK_DVDSTRUCTERROR if the passed VIDEO_TS or AUDIO_TS structure
1860// do not respectthe DVD-Video or DVD-Audio rules (DVD version only)
1861// PRIMOSDK_BADHANDLE if dwHandle is not valid
1862// PRIMOSDK_INTERR if an internal error occured
1863//
1864
1865
1866
1867DWORD WINAPI PrimoSDK_SaveImage ( DWORD dwHandle, PBYTE szFileName, PDWORD pdwSize );
1868// ====================
1869//
1870// Writes the CD Image to an ISO Image file.
1871//
1872// This function builds an ISO or UDF image (UDF only if PrimoSDK for DVD).
1873// The image can later be recorded using PrimoSDK_WriteOtherCDImage to a
1874// blank disc.
1875// This function returns immediately and continues asynchronously. The caller
1876// should use the PrimoSDK_RunningStatus to control the operations.
1877//
1878// Param: dwHandle is the operation handle
1879//
1880// szFileName is the file name where to write the image
1881//
1882// pdwSize returns the total sectors required for this CD Image
1883//
1884// Notes: This function does not engage any recorder.
1885//
1886// Return: PRIMOSDK_OK if no error
1887// PRIMOSDK_CMDSEQUENCE if not yet initialized or no CD Image started
1888// or the CD Image is empty
1889// PRIMOSDK_BADPARAM if incorrect parameters
1890// PRIMOSDK_TMPOVERFLOW if a temporary file goes in overflow
1891// PRIMOSDK_DVDSTRUCTERROR if the passed VIDEO_TS or AUDIO_TS structure
1892// do not respectthe DVD-Video or DVD-Audio rules (DVD version only)
1893// PRIMOSDK_BADHANDLE if dwHandle is not valid
1894// PRIMOSDK_INTERR if an internal error occured
1895//
1896
1897
1898
1899DWORD WINAPI PrimoSDK_NewAudio ( DWORD dwHandle, PDWORD pdwUnits );
1900// ===================
1901//
1902// Start a new Audio CD.
1903//
1904// An Audio CD is made by a list of tracks that represent the compilation.
1905// The programmer must call this function, add an audio file for each track using
1906// PrimoSDK_AddAudioTrack, then write (or test) the audio disc with PrimoSDK_WriteAudio.
1907// A call to PrimoSDK_CloseAudio will destroy the structure.
1908//
1909// Param: dwHandle is the operation handle
1910//
1911// pdwUnits points to a vector of DWORD containing the units identification,
1912// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
1913//
1914// Notes: Commercial implementations of MPEG-1 and MPEG-2 decoders are subject
1915// to royalty fees to patent holders. Many of these patents are general
1916// enough such that they are unavoidable regardless of the implementation
1917// design, and some may also apply to private implementations.
1918// Therefore, PrimoSDK supports only Wave files in its current status.
1919//
1920// Return: PRIMOSDK_OK if no error
1921// PRIMOSDK_CMDSEQUENCE if not yet initialized
1922// PRIMOSDK_BADUNIT if the unit does not exist
1923// PRIMOSDK_NOTREADY if the unit is not ready
1924// PRIMOSDK_INVALIDMEDIUM if the target disc are not blank CD-R or CD-RW
1925// PRIMOSDK_BADHANDLE if dwHandle is not valid
1926// PRIMOSDK_INTERR if an internal error occured
1927//
1928
1929
1930DWORD WINAPI PrimoSDK_CloseAudio ( DWORD dwHandle );
1931// =====================
1932//
1933// Close and destroy the Audio CD.
1934//
1935// This function must always be called after a PrimoSDK_NewAudio, to terminate
1936// and free the allocated structures.
1937//
1938// Param: dwHandle is the operation handle
1939//
1940// Notes: None.
1941//
1942// Return: PRIMOSDK_OK if no error
1943// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
1944// PRIMOSDK_BADHANDLE if dwHandle is not valid
1945// PRIMOSDK_INTERR if an internal error occured
1946//
1947
1948
1949
1950DWORD WINAPI PrimoSDK_AddAudioTrack ( DWORD dwHandle, PBYTE szTrack,
1951 DWORD dwPreGap, PDWORD pdwSize );
1952DWORD WINAPI PrimoSDK_AddAudioTrackWcs ( DWORD dwHandle, WCHAR *wcsTrack,
1953 DWORD dwPreGap, PDWORD pdwSize );
1954// ========================
1955//
1956// Add a track to the Audio CD.
1957//
1958// Param: dwHandle is the operation handle
1959//
1960// szTrack specifies an audio file
1961//
1962// dwPregap the gap, in sectors, of the track. The first
1963// track added (first song) will have a Pre-gap
1964// of 150 block, no matter what value is passed
1965//
1966// pdwSize points where is returned the size in sector
1967// of the audio file
1968//
1969// Notes: None.
1970//
1971// Return: PRIMOSDK_OK if no error
1972// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
1973// PRIMOSDK_BADPARAM if incorrect file name or if the audio file
1974// is not valid
1975// PRIMOSDK_FILEERROR if the file is not found
1976// PRIMOSDK_BADHANDLE if dwHandle is not valid
1977// PRIMOSDK_INTERR if an internal error occured
1978//
1979
1980
1981
1982DWORD WINAPI PrimoSDK_AddCDText ( DWORD dwHandle, DWORD dwFlags,
1983 PBYTE szTitle, PBYTE szPerformer, PBYTE szComposer );
1984// ====================
1985//
1986// Add the (English) CD Text for the disc and all the added tracks.
1987//
1988// Param: dwHandle is the operation handle
1989//
1990// dwFlags is for future use and must be 0 now
1991//
1992// szTitle points to a multiline string, where each line is divided by <CR><LF>;
1993// the 1st line is the Title for the disc, the 2nd for the 1st track, the
1994// 3rd line is the title of the 2nd track, and so on
1995//
1996// szPerformer is similar to szTitle, but it is for the Performer
1997//
1998// szComposer is similar to szTitle, but it is for the Composer
1999//
2000// Notes: This function must be called after all the tracks has been added, but before
2001// calling PrimoSDK_WriteAudio. This function adds in just one call the CD Text
2002// info of Title, Performer and Composer for the discs and for all the tracks.
2003// The maximum size of the sum of the buffers pointed by szTitle, szPerformer and
2004// szComposer is 6000 bytes and each one should be 2000 byte in maximum size.
2005//
2006// Return: PRIMOSDK_OK if no error
2007// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
2008// PRIMOSDK_BADPARAM if the passed parametrs are not valid
2009// PRIMOSDK_BADHANDLE if dwHandle is not valid
2010// PRIMOSDK_INTERR if an internal error occured
2011//
2012
2013
2014
2015DWORD WINAPI PrimoSDK_AddCDTextEJ ( DWORD dwHandle, DWORD dwFlags,
2016 PBYTE szTitleE, PBYTE szPerformerE, PBYTE szComposerE,
2017 PBYTE szTitleJ, PBYTE szPerformerJ, PBYTE szComposerJ );
2018// ======================
2019//
2020// Add the (English and Japanese) CD Text for the disc and all the added tracks.
2021//
2022// Param: dwHandle is the operation handle
2023//
2024// dwFlags is for future use and must be 0 now
2025//
2026// szTitleE points to a multiline string, where each line is divided by <CR><LF>;
2027// the 1st line is the Title for the disc, the 2nd for the 1st track, the
2028// 3rd line is the title of the 2nd track, and so on, in English
2029//
2030// szPerformerE is similar to szTitleE, but it is for the Performer
2031//
2032// szComposerE is similar to szTitleE, but it is for the Composer
2033//
2034// szTitleJ is similar to szTitleE, but in Japanese
2035//
2036// szPerformerJ is similar to szTitleJ, but it is for the Performer
2037//
2038// szComposerJ is similar to szTitleJ, but it is for the Composer
2039//
2040// Notes: This function must be called after all the tracks has been added, but before
2041// calling PrimoSDK_WriteAudio. This function adds in just one call the CD Text
2042// info of Title, Performer and Composer for the discs and for all the tracks.
2043// The Japanese strings must be passed in Shift JIS (Double byte).
2044// The maximum size of the sum of the buffers pointed by szTitle, szPerformer and
2045// szComposer is 6000 bytes and each one should be 2000 byte in maximum size.
2046//
2047// Return: PRIMOSDK_OK if no error
2048// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
2049// PRIMOSDK_BADPARAM if the passed parametrs are not valid
2050// PRIMOSDK_BADHANDLE if dwHandle is not valid
2051// PRIMOSDK_INTERR if an internal error occured
2052//
2053
2054
2055
2056DWORD WINAPI PrimoSDK_GetAudioTrackInfo(DWORD dwHandle, DWORD dwTrack, DWORD dwInfoType,
2057 DWORD dwResultDwords, PDWORD pdwResult);
2058// ======================
2059//
2060// Get information about an audio track. Since this can be a long operation, this does
2061// not always return information on the first call (can return PRIMOSDK_RUNNING), so it
2062// is intended to be called in the following method:
2063//
2064// while ((rc = PrimoSDK_GetAudioTrackInfo(...)) == PRIMOSDK_RUNNING)
2065// {
2066// // sleep or peek message
2067// }
2068// if (rc == PRIMOSDK_OK)
2069// {
2070// // info is valid
2071// }
2072//
2073// Param: dwHandle is the operation handle
2074//
2075// dwTrack is the number of an Audio track previously added with PrimoSDK_AddAudioTrack(Ex)
2076// or PrimoSDK_AddAudioStream (1 = the first track added)
2077//
2078// dwInfoType is one of the following:
2079// PRIMOSDK_PEAK - the peak level for the track
2080// dwResultDwords must be at least 1
2081// pdwResult will be filled with a single dword that is the peak level
2082// expressed as a number from 0 - 10000. 10000 indicates that
2083// the maximum level is 100.00% of the possible level for the track.
2084//
2085// dwResultDwords is the size (in dwords) that the caller supplies for the pdwResult array
2086//
2087// pdwResult is an array of dwords that is the result of the info type
2088//
2089// Notes: This function must be called after the specified track has been added, but before
2090// calling PrimoSDK_WriteAudio. The results can be used to modify audio using
2091// the PrimoSDK_AddAudioEffect API.
2092//
2093// Return: PRIMOSDK_OK if no error
2094// PRIMOSDK_RUNNING if it is still calculating the requested info
2095// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
2096// PRIMOSDK_BADPARAM if the passed parametrs are not valid
2097// PRIMOSDK_BADHANDLE if dwHandle is not valid
2098// PRIMOSDK_FILEERROR if an error in calculation occured
2099//
2100#define PRIMOSDK_PEAK 1
2101
2102DWORD WINAPI PrimoSDK_WriteAudio ( DWORD dwHandle, DWORD dwFlags, DWORD dwSpeed );
2103// =====================
2104//
2105// Writes the Audio CD to one or more recorders.
2106//
2107// When all the tracks have been added to the audio disc, this functions
2108// writes (or test) the Audio CD.
2109// This function returns immediately and continues asynchronously. The caller
2110// should use the PrimoSDK_RunningStatus to control the operations.
2111//
2112// Param: dwHandle is the operation handle
2113//
2114// dwFlags is (OR them if more than one):
2115// PRIMOSDK_WRITE for the real recording or PRIMOSDK_TEST for test
2116// PRIMOSDK_BURNPROOF if enable the BURN-Proof support if available
2117// PRIMOSDK_CLOSEDISC if the disc must be closed
2118//
2119// dwSpeed defines the speed to use for recording:
2120// PRIMOSDK_MAX or n (like 8 for 8x) or PRIMOSDK_BEST if the drive supports AWS
2121//
2122// Notes: Use PRIMOSDK_CLOSEDISC for normal audio discs.
2123//
2124// Return: PRIMOSDK_OK if no error
2125// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
2126// or the Audio CD is empty
2127// PRIMOSDK_BADPARAM if incorrect parameters
2128// PRIMOSDK_NOTREADY if one or more units are not ready
2129// PRIMOSDK_ITSADEMO if trying to record more than permitted with a Demo version
2130// PRIMOSDK_BADHANDLE if dwHandle is not valid
2131// PRIMOSDK_INTERR if an internal error occured
2132//
2133
2134
2135
2136DWORD WINAPI PrimoSDK_WriteAudioTrack ( DWORD dwHandle, PDWORD pdwUnits, PBYTE szTrack,
2137 DWORD dwFlags, DWORD dwSpeed );
2138DWORD WINAPI PrimoSDK_WriteAudioTrackWcs ( DWORD dwHandle, PDWORD pdwUnits, WCHAR *wcsTrack,
2139 DWORD dwFlags, DWORD dwSpeed );
2140// ==========================
2141//
2142// Writes a single track to an Audio CD on one or more recorders, in TAO.
2143// This function should be used to directly write, track by track, Audio CD, without
2144// using PrimoSDK_NewAudio, then a series of calls to PrimoSDK_AddAudioTrack, then
2145// PrimoSDK_WriteAudio and finally PrimoSDK_CloseAudio. With this function you need
2146// only to call this API, track by track, and every time wait for the writing to finish
2147// with PrimoSDK_RunningStatus. The disc could be blank (the first time) or have
2148// already some audio track. The call to write the last track must have the
2149// PRIMOSDK_CLOSEDISC flag set, to finalize the disc.
2150//
2151// Param: dwHandle is the operation handle
2152//
2153// pdwUnits points to a vector of DWORD containing the units identification,
2154// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
2155//
2156// szTrack specifies an audio file
2157//
2158// dwFlags is (OR them if more than one):
2159// PRIMOSDK_WRITE for the real recording or PRIMOSDK_TEST for test
2160// PRIMOSDK_BURNPROOF if enable the BURN-Proof support if available
2161// PRIMOSDK_CLOSEDISC for the last track to finalize the disc
2162//
2163// dwSpeed defines the speed to use for recording:
2164// PRIMOSDK_MAX or n (like 8 for 8x) or PRIMOSDK_BEST if the drive supports AWS
2165//
2166// Notes: The disc won't be playable on CD-ROM or consumer Audio CD player until
2167// it is closed.
2168//
2169// Return: PRIMOSDK_OK if no error
2170// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
2171// or the Audio CD is empty
2172// PRIMOSDK_BADPARAM if incorrect parameters
2173// PRIMOSDK_NOTREADY if one or more units are not ready
2174// PRIMOSDK_ITSADEMO if trying to record more than permitted with a Demo version
2175// PRIMOSDK_BADHANDLE if dwHandle is not valid
2176// PRIMOSDK_INTERR if an internal error occured
2177//
2178
2179
2180DWORD WINAPI PrimoSDK_NewVideoCD ( DWORD dwHandle, PDWORD pdwUnits,
2181 PBYTE szTemp, PBYTE szVideoCDTemplate );
2182// =====================
2183//
2184// Start a new Video CD.
2185//
2186// A Video CD is made by a list of MPEG1 stream files in the proper format.
2187// The programmer must call this function, add the stream files using
2188// PrimoSDK_AddVideoCDStream, then write (or test) the audio disc with PrimoSDK_WriteVideoCD.
2189// A call to PrimoSDK_CloseVideoCD will destroy the structure.
2190//
2191// Param: dwHandle is the operation handle
2192//
2193// pdwUnits points to a vector of DWORD containing the units identification,
2194// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF
2195//
2196// szTemp is a user directory where to generate the conversion of the track files
2197// just before the recording starts. The space needed in this temporary folder
2198// is the sum of the sectors returned into pdwSize by all the calls to
2199// PrimoSDK_AddVideoCDStream multiplied by 2336
2200//
2201// szVideoCDTemplate is the accessory file Vcd.dta which is provided with PrimoSDK
2202// and that must be just passed from wherever it has been stored.
2203//
2204// Notes: The file passed as szVideoCDTemplate is used only creating Video CD and,
2205// because of its size, PrimoSDK does not include it as a resource in the DLL.
2206// Therefore, all the PrimoSDK implementations that do not create Video CD do not
2207// need to carry along this extra space. If you create Video CD with PrimoSDK just
2208// inlude this file with your installation and pass its pathname to this function.
2209//
2210// Return: PRIMOSDK_OK if no error
2211// PRIMOSDK_CMDSEQUENCE if not yet initialized
2212// PRIMOSDK_BADUNIT if the unit does not exist
2213// PRIMOSDK_BADPARAM if incorrect parameters
2214// PRIMOSDK_NOTREADY if the unit is not ready
2215// PRIMOSDK_INVALIDMEDIUM if the target disc are not blank CD-R or CD-RW
2216// PRIMOSDK_FILEERROR if szVideoCDTemplate is not found
2217// PRIMOSDK_BADHANDLE if dwHandle is not valid
2218// PRIMOSDK_INTERR if an internal error occured
2219//
2220
2221
2222
2223DWORD WINAPI PrimoSDK_CloseVideoCD ( DWORD dwHandle );
2224// =======================
2225//
2226// Close and destroy the Video CD.
2227//
2228// This function must always be called after a PrimoSDK_NewVideoCD, to terminate
2229// and free the allocated structures.
2230//
2231// Param: dwHandle is the operation handle
2232//
2233// Notes: None.
2234//
2235// Return: PRIMOSDK_OK if no error
2236// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Video CD started
2237// PRIMOSDK_BADHANDLE if dwHandle is not valid
2238// PRIMOSDK_INTERR if an internal error occured
2239//
2240
2241
2242
2243DWORD WINAPI PrimoSDK_AddVideoCDStream ( DWORD dwHandle, PBYTE szStream, PDWORD pdwSize );
2244DWORD WINAPI PrimoSDK_AddVideoCDStreamWcs ( DWORD dwHandle, WCHAR *wcsStream, PDWORD pdwSize );
2245// ===========================
2246//
2247// Add a stream to the Video CD.
2248//
2249// Param: dwHandle is the operation handle
2250//
2251// szStream specifies an MPEG1 stream file. The proper stream format is
2252// - NTSC 352x240 29.97 Hz. or
2253// - PAL 352x288 25 Hz. or
2254// - Film 352x240 29.97
2255// Also, the audio inside the MPEG must be 44.1 KHz, Stereo
2256//
2257// pdwSize points where is returned the size in sector of the track
2258// that will represent that stream
2259//
2260// Notes: The maximum number of streams allowed by PrimoSDK in a Video CD is 32.
2261//
2262// Return: PRIMOSDK_OK if no error
2263// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
2264// PRIMOSDK_BADPARAM if the stream file is not valid
2265// PRIMOSDK_FILEERROR if the file is not found
2266// PRIMOSDK_BADHANDLE if dwHandle is not valid
2267// PRIMOSDK_INTERR if an internal error occured
2268//
2269
2270
2271
2272DWORD WINAPI PrimoSDK_WriteVideoCD ( DWORD dwHandle, DWORD dwFlags, DWORD dwSpeed );
2273// =======================
2274//
2275// Writes the Video CD to one or more recorders.
2276//
2277// When all the streams (tracks) have been added to the disc, this functions
2278// writes (or test) the Video CD.
2279// This function returns immediately and continues asynchronously. The caller
2280// should use the PrimoSDK_RunningStatus to control the operations.
2281//
2282// Param: dwHandle is the operation handle
2283//
2284// dwFlags is (OR them if more than one):
2285// PRIMOSDK_WRITE for the real recording or PRIMOSDK_TEST for test
2286// PRIMOSDK_BURNPROOF if enable the BURN-Proof support if available
2287// PRIMOSDK_HIGHDENSITY enable writing in high-density mode
2288//
2289// dwSpeed defines the speed to use for recording:
2290// PRIMOSDK_MAX or n (like 8 for 8x) or PRIMOSDK_BEST if the drive supports AWS
2291//
2292// Notes: A Video CD disc will always be closed.
2293//
2294// Return: PRIMOSDK_OK if no error
2295// PRIMOSDK_CMDSEQUENCE if not yet initialized or no Audio CD started
2296// or the Audio CD is empty
2297// PRIMOSDK_BADPARAM if incorrect parameters
2298// PRIMOSDK_NOTREADY if one or more units are not ready
2299// PRIMOSDK_ITSADEMO if trying to record more than permitted with a Demo version
2300// PRIMOSDK_BADHANDLE if dwHandle is not valid
2301// PRIMOSDK_INTERR if an internal error occured
2302//
2303
2304
2305
2306DWORD WINAPI PrimoSDK_ExtractAudioTrack ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwNum,
2307 PBYTE szWaveFile, PDWORD pdwSize );
2308DWORD WINAPI PrimoSDK_ExtractAudioTrackWcs ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwNum,
2309 WCHAR *wWaveFile, PDWORD pdwSize );
2310// ============================
2311//
2312// Extract a track from an Audio CD, as a Wave file.
2313//
2314// This function returns immediately and continues asynchronously. The caller
2315// should use the PrimoSDK_RunningStatus to control the operations.
2316//
2317// Param: dwHandle is the operation handle
2318//
2319// pdwUnit points to a DWORD containing the unit identification.
2320// (see PrimoSDK_UnitInfo for field format)
2321//
2322// dwNum is the track to extract (1 is the first)
2323//
2324// szWaveFile is the name where the wave file is stored
2325//
2326// pdwSize returns the total sectors of the track
2327//
2328// Notes: If the operation is aborted by the calling program, the portion
2329// of the file written until that moment is not deleted.
2330//
2331// Return: PRIMOSDK_OK if no error
2332// PRIMOSDK_CMDSEQUENCE if not yet initialized
2333// PRIMOSDK_BADPARAM if incorrect parameters
2334// PRIMOSDK_NOTREADY if the unit is not ready
2335// PRIMOSDK_BADHANDLE if dwHandle is not valid
2336// PRIMOSDK_INTERR if an internal error occured
2337//
2338
2339
2340
2341DWORD WINAPI PrimoSDK_RunningStatus ( DWORD dwHandle, DWORD dwFlags,
2342 PDWORD pdwCurSector, PDWORD pdwTotSector );
2343// ========================
2344//
2345// When PrimoSDK is testing, recording, extracting or erasing, this functions controls
2346// the status of the operation.
2347//
2348// Param: dwHandle is the operation handle
2349//
2350// dwFlags is PRIMOSDK_GETSTATUS to get the status only or
2351// PRIMOSDK_ABORT to abort the operation
2352//
2353// pdwCurSector returns the currently recording sector
2354//
2355// pdwTotSector returns the total sectors to record
2356//
2357// Notes: PrimoSDK_RunningStatus does not
2358// tell you if the operation terminated successfully, but only
2359// if it is still going or not. Please use PrimoSDK_UnitStatus for detailed error from the drive.
2360//
2361// Notes: This function should be called every 1, 2 or 3 seconds (in a timer
2362// loop), to not clog the system. After having called with the
2363// PRIMOSDK_ABORT flag do not expect that this function will
2364// immediately return with a PRIMOSDK_USERABORT reply. Some recording
2365// situations take time to conclude and it is possible to see
2366// this function keep returning PRIMOSDK_RUNNING for
2367// a while, before it aknowledges the requested abort.
2368// When mastering data (using PrimoSDK_WriteImage) this
2369// function will initially return pdwTotSector as 0, until the
2370// premastering is completed and it becomes known how many sectors
2371// are required exactly. The caller can assume that between PrimoSDK_WriteImage is
2372// launched and PrimoSDK_RunningStatus starts returning a value
2373// greater than 0 in pdwTotSector the engine is in the pre-mastering
2374// phase.
2375// When called after PrimoSDK_WriteImage, and after pdwTotSector
2376// becomes greater than 0, the mastering stays paused for 2 seconds, giving
2377// time to the caller to aknowledge the real size of the recording
2378// and aborting the operation in time to not start any real recording.
2379// This is particularly useful in close-to-full situations, as the
2380// PrimoSDK_WriteImage function, when launched, returns in pdwSize only
2381// an initial approximation of the needed total number of seconds.
2382//
2383// Return: PRIMOSDK_OK if the operation terminated OK
2384// PRIMOSDK_RUNNING if OK and still running
2385// PRIMOSDK_USERABORT if we aborted because of a call
2386// with the PRIMOSDK_ABORT flag
2387// PRIMOSDK_FILEERROR if error writing a file during extraction or while
2388// creating an image
2389// PRIMOSDK_CMDSEQUENCE if nothing is running
2390// PRIMOSDK_BADPARAM if incorrect parameters
2391// PRIMOSDK_BADHANDLE if dwHandle is not valid
2392// PRIMOSDK_INTERR if an internal error occured
2393// PRIMOSDK_FEATURE_NOT_SUPPORTED if the device does not support the feature requested.
2394//
2395
2396
2397
2398DWORD WINAPI PrimoSDK_UnitStatus ( DWORD dwHandle, PDWORD pdwUnit, PDWORD pdwCommand,
2399 PDWORD pdwSense, PDWORD pdwASC, PDWORD pdwASCQ );
2400// =====================
2401//
2402// Returns the status of a drive and, if a unit error happened, returns also
2403// the last Sense, ASC and ASCQ. Please, refer to the SCSI or ATAPI specs of the
2404// unit for the meaning of Sense, ASC and ASCQ.
2405// This function can be called at any time, but its main scope is to let
2406// the main application control the status of every unit during multiple
2407// drives operations.
2408//
2409// Param: dwHandle is the operation handle
2410//
2411// pdwUnit points to a DWORD containing the unit identification
2412// (see PrimoSDK_UnitInfo for field format)
2413//
2414// pdwCommand points where the last command code is returned
2415// when a unit error occurs
2416//
2417// pdwSense points where the Sense code is returned
2418// when a unit error occurs
2419//
2420// pdwASC points where the Additional Sense Code is returned
2421// when a unit error occurs
2422//
2423// pdwASCQ points where the Additional Sense Code Qualifiers
2424// is returned when a unit error occurs
2425//
2426// Notes: Always use this function to control the status and the final
2427// result of your operation. PrimoSDK_RunningStatus does not
2428// tell you if the operation terminated successfully, but only
2429// if it is still going or not.
2430//
2431// Return: PRIMOSDK_OK if the unit is not in error, i.e. the last operation
2432// terminated OK.
2433// PRIMOSDK_CMDSEQUENCE if not yet initialized
2434// PRIMOSDK_BADUNIT if the unit does not exist
2435// PRIMOSDK_BUR if the unit went in buffer under run;
2436// pCommand, pSense, pASC and pASCQ are set
2437// PRIMOSDK_READERROR if the unit reported a reading error;
2438// pCommand, pSense, pASC and pASCQ are set
2439// PRIMOSDK_WRITEERROR if the unit reported a recording error;
2440// pCommand, pSense, pASC and pASCQ are set
2441// PRIMOSDK_UNITERROR if the unit reported another error;
2442// pCommand, pSense, pASC and pASCQ are set
2443// PRIMOSDK_SCSIERROR if a communication error occurred
2444// PRIMOSDK_BADHANDLE if dwHandle is not valid
2445// PRIMOSDK_INTERR if an internal error occured
2446//
2447
2448
2449
2450DWORD WINAPI PrimoSDK_ListSupportedUnits ( PBYTE szList );
2451// =============================
2452//
2453// This API has been deprecated. There are many drives supported by this
2454// SDK that are not specifically returned by this API.
2455//
2456// Returns a list of the supported drives, one each line, separated by
2457// <CR><LF> and terminated by <00>. Each line contains 3 fields separated
2458// by comma, the Vendor ID, the Product ID and the Px class.
2459//
2460// Param: szList is the receiving buffer
2461//
2462// Notes: szList must be at least 10000 bytes in length.
2463// The Vendor ID and the Product are returned exactly as they are spelled
2464// by the unit. If the vendor ID is all blank (some manufacturer are making
2465// model that way) then the Vendor ID is returned as "[no brand]".
2466//
2467// Return: number of the entries in the list.
2468//
2469
2470
2471
2472DWORD WINAPI PrimoSDK_Command ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwCmdLen, PBYTE pCmd,
2473 DWORD dwDataLen, PBYTE pData, DWORD dwFlag, DWORD dwTimeOut,
2474 PDWORD pdwSense, PDWORD pdwASC, PDWORD pdwASCQ );
2475// ==================
2476//
2477// Sends a bare SCSI command to the specified SCSI or ATAPI unit. Even if the target can be
2478// a CD or DVD drive, this function is provided mostly to safely send commands to SCSI
2479// robotics or other special devices, still using the same PrimoSDK ASPI layer/control,
2480// and not having to install another layer in the system.
2481//
2482// Param: dwHandle is the operation handle
2483//
2484// pdwUnit points to a DWORD containing the unit identification (see ISORep_UnitInfo
2485// for field format). When addressing robotics the lower byte must be 00, and
2486// it will still be 00 when the function returns, because the robotics
2487// does not have any drive letter assigned. Therefore, the robotics
2488// can be addresses only by SCSI triple
2489//
2490// dwCmdLen is the length of the SCSI command (usually from 6 to
2491// 12 bytes)
2492//
2493// pCmd points to the actual SCSI command
2494//
2495// dwDataLen is the length of the data buffer, if any
2496//
2497// pDataLen points to where the data transferred by the command
2498// is read or written; can be NULL if the command has no data
2499//
2500// dwFlag can be PRIMOSDK_NODATA, PRIMOSDK_DATAIN or
2501// PRIMOSDK_DATAOUT depending how and if the command has data
2502//
2503// dwTimeOut is the command time-out in millisecond
2504//
2505// pdwSense points where the Sense code is returned
2506//
2507// pdwASC points where the Additional Sense Code is returned
2508//
2509// pdwASCQ points where the Additional Sense Code Qualifiers
2510// is returned
2511//
2512// Notes: This function must be used carefully and by programmers with
2513// experience sending SCSI commands, as the effects using wrong
2514// target drives or wrong commands could be fatal to the system.
2515//
2516// Return: PRIMOSDK_OK if the command completes successfully
2517// PRIMOSDK_CMDSEQUENCE if not yet initialized
2518// PRIMOSDK_BADUNIT if the unit does not exist
2519// PRIMOSDK_SCSIERROR if a communication error occurred
2520// or if the command went in time-out
2521// PRIMOSDK_UNITERROR if the command returned a check
2522// condition, then pSense, pASC and pASCQ point
2523// to the corresponding error triple
2524// PRIMOSDK_BADHANDLE if dwHandle is not valid
2525// PRIMOSDK_INTERR if an internal error occured
2526//
2527
2528
2529DWORD WINAPI PrimoSDK_ReadDisc ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwTrack,
2530 DWORD dwSector, DWORD dwSectorCount, PBYTE pBf);
2531// ===================
2532//
2533// Reads sectors directly off the disc.
2534//
2535// The programmer must call PrimoSDK_OpenReadDisc, read one or more areas of the disc
2536// with PrimoSDK_ReadDisc, and finally close the session with PrimoSDK_CloseReadDisc.
2537//
2538//
2539// Param: dwHandle is the operation handle
2540//
2541// pdwUnit points to a DWORD containing the unit identification
2542// (see PrimoSDK_UnitInfo for field format)
2543//
2544// dwTrack is the track number that will be read from
2545//
2546// dwSector is the sector index to start reading
2547//
2548// dwSectorCount is the number of sectors to read
2549//
2550// pBf is the buffer to receive the data
2551//
2552//
2553// Notes: The parameters pdwUnit and dwTrack must be the same as in the previous
2554// call to PrimoSDK_OpenReadDisc.
2555//
2556// This call does not return until the data is read off the disc.
2557//
2558// Return: PRIMOSDK_OK if the command completes successfully
2559// PRIMOSDK_CMDSEQUENCE if not yet initialized
2560// PRIMOSDK_BADUNIT if the unit does not exist
2561// PRIMOSDK_BADPARAM if incorrect parameters (example: dwTrack out of range 1..n)
2562// PRIMOSDK_INTERR if an internal error occurred
2563//
2564
2565
2566DWORD WINAPI PrimoSDK_OpenReadDisc ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwTrack);
2567DWORD WINAPI PrimoSDK_OpenReadDiscEx ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwTrack, DWORD dwSpeed);
2568// ===================
2569//
2570// Prepare to read sectors off the disk with PrimoSDK_ReadDisc.
2571//
2572// The programmer must call PrimoSDK_OpenReadDisc, read one or more areas of the disc
2573// with PrimoSDK_ReadDisc, and finally close the session with PrimoSDK_CloseReadDisc.
2574//
2575//
2576// Param: dwHandle is the operation handle
2577//
2578// pdwUnit points to a DWORD containing the unit identification
2579// (see PrimoSDK_UnitInfo for field format)
2580//
2581// dwTrack is the track number that will be read from
2582//
2583// dwSpeed (Ex version only) is the read speed requested
2584//
2585// Notes: None.
2586//
2587//
2588// Return: PRIMOSDK_OK if the command completes successfully
2589// PRIMOSDK_CMDSEQUENCE if not yet initialized
2590// PRIMOSDK_BADUNIT if the unit does not exist
2591// PRIMOSDK_BADPARAM if incorrect parameters (example: dwTrack out of range 1..n)
2592// PRIMOSDK_INTERR if an internal error occurred
2593//
2594
2595
2596DWORD WINAPI PrimoSDK_CloseReadDisc ( DWORD dwHandle, PDWORD pdwUnit, DWORD dwTrack);
2597// ========================
2598//
2599// Close and destroy a ReadDisc session.
2600//
2601// This function must always be called after a PrimoSDK_OpenReadDisc, to terminate
2602// and free the allocated structures.
2603//
2604//
2605// Param: dwHandle is the operation handle
2606//
2607// pdwUnit points to a DWORD containing the unit identification
2608// (see PrimoSDK_UnitInfo for field format)
2609//
2610// dwTrack is the track number that will be read from
2611//
2612// Notes: The parameters pdwUnit and dwTrack must be the same as in the previous
2613// call to PrimoSDK_OpenReadDisc.
2614//
2615//
2616// Return: PRIMOSDK_OK if the command completes successfully
2617// PRIMOSDK_CMDSEQUENCE if not yet initialized
2618// PRIMOSDK_BADUNIT if the unit does not exist
2619// PRIMOSDK_BADPARAM if incorrect parameters (example: dwTrack out of range 1..n)
2620// PRIMOSDK_INTERR if an internal error occurred
2621//
2622
2623
2624DWORD WINAPI PrimoSDK_PlayAudio(DWORD dwHandle, PDWORD pdwUnit, DWORD StartLba, DWORD Length);
2625// ===================
2626//
2627// Play Audio from the a given StartLba for a given length (in sectors)
2628//
2629// Param: dwHandle is the operation handle
2630//
2631// pdwUnit points to a DWORD containing the unit identification
2632// (see PrimoSDK_UnitInfo for field format)
2633//
2634// StartLba: Start sector (logical block Address)
2635//
2636// Length : Length (number of sectors)
2637//
2638// Return: PRIMOSDK_OK if the command completes successfully
2639// PRIMOSDK_CMDSEQUENCE if not yet initialized
2640// PRIMOSDK_BADUNIT if the unit does not exist
2641// PRIMOSDK_SCSIERROR if a communication error occurred
2642// or if the command went in time-out
2643// to the corresponding error triple
2644// PRIMOSDK_UNITERROR if the command returned a check
2645// condition.
2646// PRIMOSDK_BADHANDLE if dwHandle is not valid
2647// PRIMOSDK_INTERR if an internal error occured
2648//
2649
2650DWORD WINAPI PrimoSDK_PauseResumeAudio(DWORD dwHandle, PDWORD pdwUnit, BOOL bResume);
2651// ===================
2652//
2653// Pause or Resume Audio
2654//
2655// Param: dwHandle is the operation handle
2656//
2657// pdwUnit points to a DWORD containing the unit identification
2658// (see PrimoSDK_UnitInfo for field format)
2659//
2660// bResume : TRUE = Continue playing, FALSE = pause audio
2661//
2662// Return: PRIMOSDK_OK if the command completes successfully
2663// PRIMOSDK_CMDSEQUENCE if not yet initialized
2664// PRIMOSDK_BADUNIT if the unit does not exist
2665// PRIMOSDK_SCSIERROR if a communication error occurred
2666// or if the command went in time-out
2667// PRIMOSDK_UNITERROR if the command returned a check
2668// condition.
2669// PRIMOSDK_BADHANDLE if dwHandle is not valid
2670// PRIMOSDK_INTERR if an internal error occured
2671//
2672
2673DWORD WINAPI PrimoSDK_StopAudio(DWORD dwHandle, PDWORD pdwUnit);
2674// ===================
2675//
2676// Stop Audio from Playing
2677//
2678// Param: dwHandle is the operation handle
2679//
2680// pdwUnit points to a DWORD containing the unit identification
2681// (see PrimoSDK_UnitInfo for field format)
2682//
2683// Return: PRIMOSDK_OK if the command completes successfully
2684// PRIMOSDK_CMDSEQUENCE if not yet initialized
2685// PRIMOSDK_BADUNIT if the unit does not exist
2686// PRIMOSDK_SCSIERROR if a communication error occurred
2687// or if the command went in time-out
2688// PRIMOSDK_UNITERROR if the command returned a check
2689// condition.
2690// PRIMOSDK_BADHANDLE if dwHandle is not valid
2691// PRIMOSDK_INTERR if an internal error occured
2692//
2693
2694DWORD WINAPI PrimoSDK_GetPositionAudio(DWORD dwHandle, PDWORD pdwUnit,
2695 PDWORD pdwRelPosition,
2696 PDWORD pdwAbsPosition);
2697// ===================
2698//
2699// Gets the Position of the Audio CD
2700//
2701// Param: dwHandle is the operation handle
2702//
2703// pdwUnit points to a DWORD containing the unit identification
2704// (see PrimoSDK_UnitInfo for field format)
2705//
2706// pdwRelPosition points to a DWORD containing the Relative position in sectors
2707//
2708// pdwAbsPosition points to a DWORD containing the Absolute position in sectors
2709//
2710// Return: PRIMOSDK_OK if the command completes successfully
2711// PRIMOSDK_CMDSEQUENCE if not yet initialized
2712// PRIMOSDK_BADUNIT if the unit does not exist
2713// PRIMOSDK_SCSIERROR if a communication error occurred
2714// or if the command went in time-out
2715// PRIMOSDK_UNITERROR if the command returned a check
2716// condition.
2717// PRIMOSDK_BADHANDLE if dwHandle is not valid
2718// PRIMOSDK_INTERR if an internal error occured
2719// PRIMOSDK_BADPARAM if the pointers for the positions are NULL
2720
2721
2722DWORD WINAPI PrimoSDK_AddFolderWCS ( DWORD dwHandle, PWORD szFolder );
2723// ====================
2724//
2725// Add a folder to the "CD Image".
2726//
2727// Same as PrimoSDK_AddFolder except that the names are Unicode (Wide Characters)
2728//
2729// The folder must always be fully specified. Therefore, when adding a subfolder also
2730// the parent is specified. This function adds only one level at a time.
2731// For example, to create the path "\My Folder\My Sub Folder" and the path
2732// "\My Folder\My Second Sub Folder", that is:
2733//
2734// \My Folder
2735// \My Sub Folder
2736// \My Second Sub Folder
2737//
2738// The calls to this function should be:
2739//
2740// PrimoSDK_AddFolder(dwHandle,"\My Folder");
2741// PrimoSDK_AddFolder(dwHandle,"\My Folder\My Sub Folder");
2742// PrimoSDK_AddFolder(dwHandle,"\My Folder\My Second Sub Folder");
2743//
2744// Param: dwHandle is the operation handle
2745//
2746// szFolder specifies the folder name in MBCS
2747//
2748// Notes: If PRIMOSDK_ISOLEVEL1 is specified, the folder must not have
2749// any extension; it can be just up to 8 char.
2750// The first backslash is mandatory. A trailer backslash
2751// is optional. There is no need to create the root folder.
2752//
2753// Return: PRIMOSDK_OK if no error
2754// PRIMOSDK_CMDSEQUENCE if not yet initialized or, CD Image started or
2755// if (only if PrimoSDK_NewImage was called with PRIMOSDK_CHECKDUPLI)
2756// the nested folders have not been added yet
2757// PRIMOSDK_BADPARAM if incorrect or too long folder name
2758// PRIMOSDK_ALREADYEXIST if the folder has been already added
2759// (only if PrimoSDK_NewImage was called with PRIMOSDK_CHECKDUPLI)
2760// PRIMOSDK_BADHANDLE if dwHandle is not valid
2761// PRIMOSDK_NOSPACE if the internal tables went in overflow (too many
2762// files for the system memory)
2763// PRIMOSDK_INTERR if an internal error occured
2764//
2765
2766
2767DWORD WINAPI PrimoSDK_AddFileWCS ( DWORD dwHandle, PWORD szFileOnCD, PWORD szSourceFile );
2768// ==================
2769//
2770// Add szSourceFile to the "CD Image" with the name szFileOnCD.
2771// Same as PrimoSDK_AddFile except that the names are Unicode (Wide Characters)
2772//
2773// Both files must be fully specified, and the folder must already exist.
2774// For example:
2775//
2776// PrimoSDK_AddFile(dwHandle,"\My File.Txt","D:\Source\My File.Txt")
2777// adds the file "My File.Txt" that is stored in "D:\Source"
2778// to the CD root, with the same name.
2779//
2780// PrimoSDK_AddFile(dwHandle,"\My Folder\Your File.Txt","D:\Source\My File.Txt")
2781// adds the same file to the "\My Folder" on the CD, with
2782// the new name "Your File.Txt". "\My Folder" must have been already
2783// added to the CD Image with a previous call to PrimoSDK_AddFolder.
2784//
2785// Param: dwHandle is the operation handle
2786//
2787// szFileOnCD specifies the file name on CD in Unicode
2788//
2789// szSourceFile specifies the source file name in Unicode
2790//
2791// Notes: None.
2792//
2793// Return: PRIMOSDK_OK if no error
2794// PRIMOSDK_CMDSEQUENCE if not yet initialized, no CD Image started or
2795// if (only if PrimoSDK_NewImage was called with PRIMOSDK_CHECKDUPLI)
2796// the nested folders have not been added yet
2797// PRIMOSDK_BADPARAM if incorrect or too long file name
2798// PRIMOSDK_ALREADYEXIST if szFileOnCD name has been already added
2799// (only if PrimoSDK_NewImage was called with PRIMOSDK_CHECKDUPLI)
2800// PRIMOSDK_NOTREADABLE if the source file is not found or not readable
2801// PRIMOSDK_FILEERROR if a file that was added is invalid
2802// PRIMOSDK_BADHANDLE if dwHandle is not valid
2803// PRIMOSDK_NOSPACE if the internal tables went in overflow (too many
2804// files for the system memory)
2805// PRIMOSDK_INTERR if an internal error occured
2806// PRIMOSDK_FILETOOLARGE if a file that was added is bigger than 9.99 GB for UDF
2807// or bigger than 4 GB for ISO.
2808//
2809
2810DWORD WINAPI PrimoSDK_GetSpaceUsed(DWORD dwHandle, PDWORD pdwSize, PDWORD pdwLastSector);
2811// ========================
2812//
2813// Gets the space used for the current data set for the next data job.
2814//
2815// pdwSize: returns the number of sectors used (meta data + data)
2816//
2817// pdwLastSector: last sector that will be written to.
2818//
2819// Notes: use to subtract from DiscInfo's reported capacity for space left on media
2820// pdwSize gives full size of Meta Data + Data for session / (no media = assumed blank)
2821//
2822// Return: PRIMOSDK_OK if no error
2823// PRIMOSDK_CMDSEQUENCE if not yet initialized
2824// PRIMOSDK_BADHANDLE if dwHandle is not valid
2825// PRIMOSDK_INTERR if an internal error occured
2826
2827
2828
2829DWORD WINAPI PrimoSDK_NewImageWCS ( DWORD dwHandle, PDWORD pdwUnits, PWORD szVolumeNameWCS,
2830 DWORD dwTrackToLoad, DWORD dwFlags, DWORD dwSwapThreshold,
2831 PBYTE szTemp );
2832// ======================
2833//
2834// Start a new Data "CD Image". (Same as PrimoSDK_NewImage but with wide character volume name string
2835//
2836// The programmer must call this function, next add directory and files with
2837// PrimoSDK_AddFolder and PrimoSDK_AddFile, then call the PrimoSDK_WriteImage to
2838// record (or test) the image. A call to PrimoSDK_CloseImage will destroy the structure.
2839//
2840// Param: dwHandle is the operation handle
2841//
2842// pdwUnits points to a vector of DWORD containing the units identification,
2843// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF.
2844// If the caller is starting a new image to just build an ISO or UDF
2845// image file using PrimoSDK_SaveImage, or a Global Image with
2846// PrimoSDK_SaveGI, no unit is required; in this case just pass the
2847// 0xFFFFFFFF in the first position
2848//
2849// dwSwapThreshold sets the size (in KB) of the files that are copied in the temporary.
2850// For example, 4 means that all the files under 4096 bytes in size will be
2851// copied by PrimoSDK in a swap file generated in szTemp. This file will be
2852// destroyed by PrimoSDK_CloseImage. A value of 0 means that no swap file is
2853// generated. The caching maximum value is 256.
2854// The value 0xFFFFFFFF means that all files up to 2 GB will be cached. If
2855// all files are less than 2GB, then a complete image will exist on the
2856// hard disk before writing to CD/DVD.
2857//
2858// szTemp is a user directory where to generate the swap files.
2859//
2860// szVolumeNameWCS specifies the volume label of the CD and some optional PVD fields in
2861// one of the following formats:
2862// \nVolume[\nPublisher[\nDataPreparer[\nApplicationID[\nSystemID]]]]
2863// Volume[,Publisher[,DataPreparer[,ApplicationID]]]
2864// The max lengths are 32 for the Volume and 128 for the other three fields,
2865// in characters.
2866//
2867// dwTrackToLoad specifies if and which track should be loaded (linked)
2868// to this. If 0 no track is loaded and this will be like a new
2869// volume in the free space.
2870// To append to DVD+RW or DVD-RW media, this value should always be 1.
2871// For all other media, a value of 1 loads the first track,
2872// 2 the second and so on. The caller should check to ask for a track
2873// that already exists on the disc, otherwise a PRIMOSDK_BADPARAM
2874// is returned. To create an incremental disc this field should
2875// always specify the last track present on the disc.
2876// To append to BD-RE or BD-R (POW) media, If 0, no track will be loaded. A non-zero
2877// value shall indicate appending to the last session.
2878//
2879// dwFlags is a combination of the following values:
2880//
2881// Set only ONE of the following values:
2882//
2883// PRIMOSDK_ISOLEVEL1 for an ISO 9660 Level 1 compliant CD with
2884// folder and file names in the 8+3 format
2885// using only the A-:-Z, 0-:-9 and "_"
2886// char. set
2887// PRIMOSDK_ISOLEVEL2 for an ISO 9660 Level 2 compliant CD
2888// (DOS OEM characters)
2889// PRIMOSDK_ISOLEVEL3 for an ISO 9660 Level 3 compliant CD
2890// (DOS OEM characters, long file names)
2891// PRIMOSDK_JOLIET for a Microsoft Joliet compliant CD with
2892// filenames up to 106 chars in all the Windows
2893// legal charset, double chars. included (MBCS)
2894// [Technical spec limits at 64, readers generally supports more]
2895// PRIMOSDK_UDF for a UDF 1.02 bridge file system
2896// (bridge includes Joliet/ISO, which limits
2897// filenames to 106 chars)
2898// PRIMOSDK_UDF201 for a UDF 2.01 bridge file system
2899// (bridge includes Joliet/ISO, which limits
2900// filenames to 106 chars)
2901//
2902// OR one of the values above with any of the following:
2903//
2904// PRIMOSDK_ORIGDATE to mantain the original date/time for all files
2905// (this flag is mutually exclusive with PRIMOSDK_SETNOW)
2906// PRIMOSDK_USERTIMESET to supply a date/time for all streamed files
2907// (this flag is mutually exclusive with PRIMOSDK_SETNOW)
2908// PRIMOSDK_SETNOW to have all files set to the time/date at which the
2909// PrimoSDK_NewImageWCS is called.
2910// (this flag is mutually exclusive with PRIMOSDK_ORIGDATE
2911// and PRIMOSDK_USERTIMESET)
2912// PRIMOSDK_MODE1 to make a CD-ROM Mode 1 disc or a DVD
2913// (this flag is mutually exclusive with PRIMOSDK_MODE2)
2914// PRIMOSDK_MODE2 to make a CD-ROM Mode 2 XA disc
2915// (this flag is mutually exclusive with PRIMOSDK_MODE1)
2916// PRIMOSDK_SAO if the disc must be written Session At Once. This flag, combined
2917// with the following PRIMOSDK_CLOSEDISC let you make any
2918// type of recording. When PRIMOSDK_SAO is not specified
2919// the recording is done Track At Once
2920// Note: for media larger than 2GB (DVD/BD) this will
2921// create closed media by default even if PRIMOSDK_CLOSEDISC
2922// is not specified.
2923// PRIMOSDK_TAO if the disc is written Track At Once. Required for DVD
2924// multi-border (DVD-RW, DVD-R, DVD+R). Optional for
2925// CD-R/RW, DDCD-R/RW. Must not be combined with
2926// PRIMOSDK_SAO or PRIMOSDK_BADPARAM will be returned.
2927// PRIMOSDK_CLOSEDISC if the disc must be closed so no other session can
2928// be added.
2929// PRIMOSDK_CHECKDUPLI if the caller prefers that all the subsequent calls to
2930// PrimoSDK_AddFolder and to PrimoSDK_AddFile will do a
2931// check before adding. It will be checked that the file
2932// or folder does not already exist (PRIMOSDK_ALREADYEXIST
2933// is returned then) and that the nested path has been
2934// already created (PRIMOSDK_CMDSEQUENCE in that case).
2935// The use of this flag could slow down the time needed to add
2936// all the files to the image.
2937// PRIMOSDK_RESETDRIVES is a special value that must be passed alone in dwFlags
2938// to redefines the units and volume name before a
2939// PrimoSDK_WriteImage of an additional round
2940// PRIMOSDK_VIDEOCD enables the engine recognition of the VCD 2.0/SVCD directories
2941// PRIMOSDK_DVDIMAGE set this if the image is to be written to a DVD. This flag is
2942// ignored if there are units in pdwUnits.
2943//
2944// Notes: Only the first 11 characters of the volume label are usually visible.
2945// The caller should use PRIMOSDK_RESETDRIVES when a round has been completed and
2946// there is the need to make another round, on different units or with different
2947// volume names, without rebuilding again the image.
2948// The optimal value of dwSwapThreshold greatly changes from machine to machine.
2949// A fast PC can work without swap, but usually a swap from 2KB to 8KB is fine
2950// when in presence of a large number of files. Avoid using large values of
2951// dwSwapThreshold, as it could cause the cache file to exceed available hard disk
2952// space.
2953// Use the flag PRIMOSDK_CHECKDUPLI sparingly, as it could slow down the time needed to
2954// add all the files to the image. It is suggested to use this flag only during the
2955// application debug, until you are sure that the call sequence is completely correct.
2956// If writing to a DVD the PRIMOSDK_MODE2 should not be used. If it is,
2957// PRIMOSDK_MODE1 will be automatically used instead.
2958//
2959// Return: PRIMOSDK_OK if no error
2960// PRIMOSDK_CMDSEQUENCE if not yet initialized
2961// PRIMOSDK_BADUNIT if the unit does not exist
2962// PRIMOSDK_BADPARAM if incorrect parameters
2963// PRIMOSDK_NOTREADY if the unit is not ready
2964// PRIMOSDK_ERRORLOADING if there is an error while loading a previous track
2965// PRIMOSDK_INVALIDMEDIUM if the target disc are not blank nor appendable
2966// or if you are recording on several appendable discs but they
2967// are not equal
2968// PRIMOSDK_BADHANDLE if dwHandle is not valid
2969// PRIMOSDK_INTERR if an internal error occured
2970//
2971
2972
2973DWORD WINAPI PrimoSDK_SetProperty(DWORD dwHandle, DWORD Property, DWORD BufferSize, void *PropertyBuffer,
2974 DWORD ExtendedInfo, void *ExtendedData);
2975// ======================
2976//
2977// Set a property controlling the specified PrimoSDK handle. This property will be
2978// in effect for all APIs that use a PrimoSDK dwHandle parameter.
2979//
2980// Param: dwHandle is the operation handle
2981//
2982// Property is the property to set. General properties may be added and
2983// defined below. Additional properties may also exist in advanced
2984// API sections below. Properties will be listed with the header:
2985// "PrimoSDK_SetProperty Property values"
2986//
2987// BufferSize is the size of the PropertyBuffer supplied by the client.
2988//
2989// PropertyBuffer is the property data to set. Varies depending on the property
2990// value.
2991//
2992// ExtendedInfo is reserved for future use, should be 0.
2993//
2994// ExtendedData is reserved for future use, should be NULL.
2995//
2996// Return: PRIMOSDK_OK if no error.
2997// PRIMOSDK_INVALIDPROP if an invalid property is specified
2998//
2999
3000
3001
3002DWORD WINAPI PrimoSDK_Init ( PDWORD pdwRelease );
3003// ===============
3004//
3005// Initialize PrimoSDK.
3006//
3007// This function must be called before any other PrimoSDK call, excluding PrimoSDK_Trace,
3008// to initialize the internal structures.
3009//
3010// Param: pdwRelease points to a DWORD that receives the PRIMOSDK.DLL
3011// version number 0xRRSSBBBB
3012// RR = Version number
3013// SS = Sub Version number
3014// BBBB = Build number
3015//
3016// Notes: You should call this function only once, when your
3017// application or module starts.
3018// PrimoSDK needs an ASPI layer to communicate with both
3019// ATAPI or SCSI units. A compatible WinASPI layer
3020// or PxHelper (recommended) can be used.
3021//
3022// Return: PRIMOSDK_CDDVDVERSION if OK, this the SDK retail CD and DVD version
3023// PRIMOSDK_DEMOVERSION if OK, this the SDK demo version
3024// PRIMOSDK_CMDSEQUENCE if already initialized
3025// PRIMOSDK_NOASPI if the ASPI layer is not loading or is in error
3026// PRIMOSDK_INTERR if an internal error occured
3027//
3028
3029
3030
3031DWORD WINAPI PrimoSDK_NewImage ( DWORD dwHandle, PDWORD pdwUnits, PBYTE szVolumeName,
3032 DWORD dwTrackToLoad, DWORD dwFlags, DWORD dwSwapThreshold,
3033 PBYTE szTemp );
3034// ===================
3035//
3036// Start a new Data "CD Image".
3037//
3038// The programmer must call this function, next add directory and files with
3039// PrimoSDK_AddFolder and PrimoSDK_AddFile, then call the PrimoSDK_WriteImage to
3040// record (or test) the image. A call to PrimoSDK_CloseImage will destroy the structure.
3041//
3042// Param: dwHandle is the operation handle
3043//
3044// pdwUnits points to a vector of DWORD containing the units identification,
3045// (see PrimoSDK_UnitInfo for field format) terminated by 0xFFFFFFFF.
3046// If the caller is starting a new image to just build an ISO or UDF
3047// image file using PrimoSDK_SaveImage, or a Global Image with
3048// PrimoSDK_SaveGI, no unit is required; in this case just pass the
3049// 0xFFFFFFFF in the first position
3050//
3051// dwSwapThreshold sets the size (in KB) of the files that are copied in the temporary.
3052// For example, 4 means that all the files under 4096 bytes in size will be
3053// copied by PrimoSDK in a swap file generated in szTemp. This file will be
3054// destroyed by PrimoSDK_CloseImage. A value of 0 means that no swap file is
3055// generated. The caching maximum value is 256.
3056// The value 0xFFFFFFFF means that all files up to 2 GB will be cached. If
3057// all files are less than 2GB, then a complete image will exist on the
3058// hard disk before writing to CD/DVD.
3059//
3060// szTemp is a user directory where to generate the swap files.
3061//
3062// szVolumeName specifies the volume label of the CD and some optional PVD fields in
3063// one of the following formats:
3064// \nVolume[\nPublisher[\nDataPreparer[\nApplicationID[\nSystemID]]]]
3065// Volume[,Publisher[,DataPreparer[,ApplicationID]]]
3066// The max lengths are 32 for the Volume and 128 for the other three fields,
3067// in bytes.
3068//
3069// dwTrackToLoad specifies if and which track should be loaded (linked)
3070// to this. If 0 no track is loaded and this will be like a new
3071// volume in the free space.
3072// To append to DVD+RW or DVD-RW media, this value should always be 1.
3073// For all other media, a value of 1 loads the first track,
3074// 2 the second and so on. The caller should check to ask for a track
3075// that already exists on the disc, otherwise a PRIMOSDK_BADPARAM
3076// is returned. To create an incremental disc this field should
3077// always specify the last track present on the disc.
3078// To append to BD-RE or BD-R (POW) media, If 0, no track will be loaded. A non-zero
3079// value shall indicate appending to the last session.
3080//
3081//
3082// dwFlags is a combination of the following values:
3083//
3084// Set only ONE of the following values:
3085//
3086// PRIMOSDK_ISOLEVEL1 for an ISO 9660 Level 1 compliant CD with
3087// folder and file names in the 8+3 format
3088// using only the A-:-Z, 0-:-9 and "_"
3089// char. set
3090// PRIMOSDK_ISOLEVEL2 for an ISO 9660 Level 2 compliant CD
3091// (DOS OEM characters)
3092// PRIMOSDK_ISOLEVEL3 for an ISO 9660 Level 3 compliant CD
3093// (DOS OEM characters, long file names)
3094// PRIMOSDK_JOLIET for a Microsoft Joliet compliant CD with
3095// filenames up to 106 chars in all the Windows
3096// legal charset, double chars. included (MBCS)
3097// PRIMOSDK_UDF for a UDF 1.02 bridge file system
3098// PRIMOSDK_UDF201 for a UDF 2.01 bridge file system
3099//
3100// OR one of the values above with any of the following:
3101//
3102// PRIMOSDK_ORIGDATE to mantain the original date/time for all files
3103// (this flag is mutually exclusive with PRIMOSDK_SETNOW)
3104// PRIMOSDK_SETNOW to have all files set to the time/date at which the
3105// PrimoSDK_NewImage is called.
3106// (this flag is mutually exclusive with PRIMOSDK_ORIGDATE
3107// and PRIMOSDK_USERTIMESET)
3108// PRIMOSDK_MODE1 to make a CD-ROM Mode 1 disc or a DVD
3109// (this flag is mutually exclusive with PRIMOSDK_MODE2)
3110// PRIMOSDK_MODE2 to make a CD-ROM Mode 2 XA disc
3111// (this flag is mutually exclusive with PRIMOSDK_MODE1)
3112// PRIMOSDK_SAO if the disc must be written Session At Once. This flag, combined
3113// with the following PRIMOSDK_CLOSEDISC let you make any
3114// type of recording. When PRIMOSDK_SAO is not specified
3115// the recording is done Track At Once
3116// Note: for media larger than 2GB (DVD/BD) this will
3117// create closed media by default even if PRIMOSDK_CLOSEDISC
3118// is not specified.
3119// PRIMOSDK_TAO if the disc is written Track At Once. Required for DVD
3120// multi-border (DVD-RW, DVD-R, DVD+R). Optional for
3121// CD-R/RW, DDCD-R/RW. Must not be combined with
3122// PRIMOSDK_SAO or PRIMOSDK_BADPARAM will be returned.
3123// PRIMOSDK_CLOSEDISC if the disc must be closed so no other session can
3124// be added.
3125// PRIMOSDK_CHECKDUPLI if the caller prefers that all the subsequent calls to
3126// PrimoSDK_AddFolder and to PrimoSDK_AddFile will do a
3127// check before adding. It will be checked that the file
3128// or folder does not already exist (PRIMOSDK_ALREADYEXIST
3129// is returned then) and that the nested path has been
3130// already created (PRIMOSDK_CMDSEQUENCE in that case).
3131// The use of this flag could slow down the time needed to add
3132// all the files to the image.
3133// PRIMOSDK_RESETDRIVES is a special value that must be passed alone in dwFlags
3134// to redefines the units and volume name before a
3135// PrimoSDK_WriteImage of an additional round
3136// PRIMOSDK_VIDEOCD enables the engine recognition of the VCD 2.0/SVCD directories
3137// PRIMOSDK_DVDIMAGE set this if the image is to be written to a DVD. This flag is
3138// ignored if there are units in pdwUnits.
3139//
3140// Notes: Only the first 11 characters of the volume label are usually visible.
3141// The caller should use PRIMOSDK_RESETDRIVES when a round has been completed and
3142// there is the need to make another round, on different units or with different
3143// volume names, without rebuilding again the image.
3144// The optimal value of dwSwapThreshold greatly changes from machine to machine.
3145// A fast PC can work without swap, but usually a swap from 2KB to 8KB is fine
3146// when in presence of a large number of files. Avoid using large values of
3147// dwSwapThreshold, as it could cause the cache file to exceed available hard disk
3148// space.
3149// Use the flag PRIMOSDK_CHECKDUPLI sparingly, as it could slow down the time needed to
3150// add all the files to the image. It is suggested to use this flag only during the
3151// application debug, until you are sure that the call sequence is completely correct.
3152// If writing to a DVD the PRIMOSDK_MODE2 should not be used. If it is,
3153// PRIMOSDK_MODE1 will be automatically used instead.
3154//
3155// Return: PRIMOSDK_OK if no error
3156// PRIMOSDK_CMDSEQUENCE if not yet initialized
3157// PRIMOSDK_BADUNIT if the unit does not exist
3158// PRIMOSDK_BADPARAM if incorrect parameters
3159// PRIMOSDK_NOTREADY if the unit is not ready
3160// PRIMOSDK_ERRORLOADING if there is an error while loading a previous track
3161// PRIMOSDK_INVALIDMEDIUM if the target disc are not blank nor appendable
3162// or if you are recording on several appendable discs but they
3163// are not equal
3164// PRIMOSDK_BADHANDLE if dwHandle is not valid
3165// PRIMOSDK_INTERR if an internal error occured
3166//
3167
3168
3169
3170#ifdef __cplusplus
3171}
3172#endif
3173