📄 neroapi.h
字号:
NERO_ADD_LOG_LINE_CALLBACK npAddLogLineCallback;
NERO_SET_PHASE_CALLBACK npSetPhaseCallback;
void *npUserData;
NERO_DISABLE_ABORT_CALLBACK npDisableAbortCallback; /* Will be called only if the NBF_DISABLE_ABORT flags is given to the NeroBurn function */
NERO_SET_MAJOR_PHASE_CALLBACK npSetMajorPhaseCallback;
NERO_PROGRESS_CALLBACK npSubTaskProgressCallback; /* provide the write buffer fill level */
} NERO_PROGRESS;
/*
// NeroAPI >= 6.0.0.0
// creates a NERO_PROGRESS structure correctly initialised.
// Must be freed with NeroFreeMem when no longer needed.
*/
NEROAPI_API NERO_PROGRESS* NADLL_ATTR NeroCreateProgress();
/*
// Data exchange between application and NeroAPI is done with
// a function that gets a pointer to its own structure, a buffer
// pointer and the amount in bytes to be read or written. It
// shall return the actual amount of bytes transferred. Other
// functions indicate that the EOF file has been reached when
// reading or a serious error occured.
*/
typedef DWORD (NERO_CALLBACK_ATTR *NERO_IO_CALLBACK)(void *pUserData, BYTE *pBuffer, DWORD dwLen);
typedef BOOL (NERO_CALLBACK_ATTR *NERO_STATUS_CALLBACK)(void *pUserData);
typedef struct tag_NERO_IO
{
void *nioUserData;
NERO_IO_CALLBACK nioIOCallback;
NERO_STATUS_CALLBACK nioEOFCallback; // shall return TRUE if further IO calls will always fail to transfer any data, i.e. EOF reached
NERO_STATUS_CALLBACK nioErrorCallback; // shall return TRUE if an error occured during an IO call
} NERO_IO;
/* A pointer on this structure will be passed with the DLG_WAITCD_MEDIA_INFO user dialog callback
(NeroAPI>=5.5.9.4)
*/
typedef struct
{
DWORD ndwmiSize;
NERO_MEDIA_TYPE ndwmiLastDetectedMedia;
NERO_MEDIA_SET ndwmiRequestedMedia;
const char *ndwmiLastDetectedMediaName;
const char *ndwmiRequestedMediaName;
} NERO_DLG_WAITCD_MEDIA_INFO;
/*
// ISO track generation functions
*/
typedef struct tag_NERO_ISO_ITEM
{
char fileName[252]; // Deprecated, use longFileName instead
char *longFileName; // File name on the burnt CD
// (will be freed in NeroFreeIsoItem if this item is a reference)
BOOL isDirectory; // Is this item a directory ?
BOOL isReference; // Is this item a reference to a file/directory of a previous session
// when recording RockRidge, you can set the name of a directory to be used for
// retrieving rockridge informations here
char sourceFilePath[252]; // Deprecated, use longSourceFilePath instead
const char *longSourceFilePath; // Path to the file, including file name (ignored for a directory)
struct tag_NERO_ISO_ITEM *subDirFirstItem; // Point on the first item of the sub directory if the item is a directory
// Can be NULL if the directory is empty
// (ignored for a file)
struct tag_NERO_ISO_ITEM *nextItem; // Next item in the current directory
void *userData; // Can be used to store additional informations
// Used to reference a file from a previous session
long dataStartSec;
__int64 dataLength;
struct tm entryTime;
int itemSize; // Size of the structure
struct CImportInfo *importinfo; // ImportInfo
WCHAR *unicodeFileName; // NeroAPI>=6.6.0.0: file name on the burnt CD in unicode format. If unicodeFileName is present, it supersedes fileName and longFileName.
// (will be freed in NeroFreeIsoItem if this item is a reference)
} NERO_ISO_ITEM;
typedef struct tag_NERO_IMPORT_DATA_TRACK_INFO
{
DWORD nidtiSize; // Must contain the size of the structure
char *nidtipVolumeName; // This must be released using NeroFreeMem
} NERO_IMPORT_DATA_TRACK_INFO;
// NeroCreateIsoItem: Allocate an instance from the NERO_ISO_ITEM structure
// The itemSize member of the structure will be automatically be filled by this
// function
#define NeroCreateIsoItem() NeroCreateIsoItemOfSize(sizeof(NERO_ISO_ITEM))
NEROAPI_API NERO_ISO_ITEM * NADLL_ATTR NeroCreateIsoItemOfSize(size_t);
// Free an instance from the NERO_ISO_ITEM structure
// longFilename is only freed if this item is a reference, because only then is longFilename allocated by NeroAPI
NEROAPI_API void NADLL_ATTR NeroFreeIsoItem(NERO_ISO_ITEM *);
/*
// NeroAPI >= 6.0.0.0:
// Free an NERO_ISO_ITEM including all linked items
*/
NEROAPI_API void NADLL_ATTR NeroFreeIsoItemTree(NERO_ISO_ITEM*);
// NeroCopyIsoItem: Create a copy of an existing NERO_ISO_ITEM object.
// This is a safe way to obtain an exact copy of NERO_ISO_ITEM objects imported
// from a previous session
// Note that the new NERO_ISO_ITEM's nextItem,userData and subDirFirstItem members are set to NULL
// longFilename is only copied if this item is a reference, because only then is longFilename allocated by NeroAPI
// Available for NeroAPI versions >5.5.9.9
NEROAPI_API NERO_ISO_ITEM * NADLL_ATTR NeroCopyIsoItem(const NERO_ISO_ITEM *iso_item);
// Create an ISO track from a NERO_ISO_ITEM tree
// NeroAPI >= 5.5.9.0:
// For special needs you have to give a pointer to NeroCITEArgs instead of name.
// See declaration of NeroCiteArgs below. Set flags to NCITEF_USE_STRUCT,
// to tell NeroCreateIsoTrackEx that name is a NeroCITEArgs struct and set the flags
// for the burn options with NeroCITEArgs::dwBurnOptions. root should also be NULL
// in this case.
NEROAPI_API
struct CNeroIsoTrack * NADLL_ATTR NeroCreateIsoTrackEx(NERO_ISO_ITEM *root, // First item of the root directory
const char *name, // Name of the CD
DWORD flags); // See constants below
// NeroAPI >= 6.6.0.13
// Ability to set desired UDF revision and partition type of created UDF file system.
// These methods will have no effect, if the track does not contain UDF part.
typedef enum
{
NUR_UDF_INVALID,
NUR_UDF_102,
NUR_UDF_150,
NUR_UDF_200,
NUR_UDF_201,
NUR_UDF_250
} NERO_UDF_REVISION;
NEROAPI_API BOOL NADLL_ATTR NeroSetDesiredUDFRevision(struct CNeroIsoTrack *track,
NERO_UDF_REVISION desiredRevision);
typedef enum
{
NUPT_INVALID,
NUPT_PHYSICAL,
NUPT_VIRTUAL,
NUPT_SPARING
} NERO_UDF_PARTITION_TYPE;
NEROAPI_API BOOL NADLL_ATTR NeroSetDesiredUDFPartitionType(struct CNeroIsoTrack *track,
NERO_UDF_PARTITION_TYPE desiredPartitionType);
// this struct can be used to give some more parameters to NeroCreateIsoTrackEx:
// - If a CD shall have two different filesystems (e.g. HFS+ CDs), you can give
// the second filesystem with firstRootItem_wrapper.
// - give some information to be written to the volume descriptor
typedef struct tag_NERO_CITE_ARGS {
int size; // ignored. Initialise whole struct with 0. The version of the
// struct will be taken from expected version of NeroAPI
NERO_ISO_ITEM *firstRootItem;
NERO_ISO_ITEM *firstRootItem_wrapper;
const char *name;
DWORD dwBurnOptions;
// NeroAPI >= 5.5.9.26:
const char *systemIdentifier; // system identifier
const char *volumeSet;
const char *publisher; // the publisher of this track
const char *dataPreparer; // the preparer of this track
const char *application; // the application, that created this track
const char *copyright; // copyright file
const char *abstract; // abstract file
const char *bibliographic; // bibliographic file
} NERO_CITE_ARGS;
// definition for compatibility reasons
#define NeroCITEArgs NERO_CITE_ARGS
#define NCITEF_USE_JOLIET (1<<0)
#define NCITEF_USE_MODE2 (1<<1)
#define NCITEF_USE_ROCKRIDGE (1<<2)
#define NCITEF_CREATE_ISO_FS (1<<3)
#define NCITEF_CREATE_UDF_FS (1<<4)
#define NCITEF_CREATE_HFS_FS (1<<5)
#define NCITEF_DVDVIDEO_REALLOC (1<<6) // NeroAPI>=5.5.7.8: Perform reallocation of files in the VIDEO_TS directory; NeroAPI>=6.3.1.4: Also create layerbreak if writing on a double layer medium
#define NCITEF_USE_STRUCT (1<<7) // NeroAPI>=5.5.9.0: 'name' points to an argument struct instead of name. If set, 'root' and other 'flags' are ignored.
#define NCITEF_RESERVED1 (1<<8) // Reserved
#define NCITEF_USE_ALLSPACE (1<<9) // NeroAPI>=5.5.9.17: Use all space available on the medium for the volume to be created. Supported for DVD+-RW only
#define NCITEF_RESERVED2 (1<<10) // Reserved
#define NCITEF_RESERVED3 (1<<11) // Reserved
#define NCITEF_RESERVED4 (1<<12) // Reserved
#define NCITEF_RELAX_JOLIET (1<<13) // NeroAPI>=6.0.0.0:Relax joliet filename length limitations -> allow a maximum of 109 characters per filename
#define NCITEF_DVDVIDEO_CMPT (1<<14) // NeroAPI>6.0.0.13: Create DVD-Video compatible medium, NCITEF_CREATE_ISO_FS and NCITEF_CREATE_UDF_FS must be set,
// NCITEF_DVDVIDEO_REALLOC may be set to reallocate DVD-Video .IFO pointers
// Note that NeroAPI versions prior or equal to 6.0.0.13 will implicitly enable DVD-Video compatibility
// when DVD-Video content is found within your compilation
#define NCITEF_RESERVED5 (1<<15) // Reserved
#define NCITEF_RESERVED6 (1<<16) // Reserved
#define NCITEF_RESERVED7 (1<<17) // Reserved
// Free an ISO track previously allocated with NeroCreateIsoTrackEx
NEROAPI_API void NADLL_ATTR NeroFreeIsoTrack(struct CNeroIsoTrack *track);
typedef enum
{
NIDTR_NO_ERROR=0,
NIDTR_GENERIC_ERROR, // undefined error
NIDTR_DRIVE_ERROR, // get more details with NeroGetLastDriveError
// filesystem errors below, maybe a corrupted filesystem etc.
// If one of these is returned, parts of the filesystem may have
// been imported nevertheless
NIDTR_READ_ERROR, // error while reading from the disc
NIDTR_INVALID_FS, // errors in the filesystem on the disc
NIDTR_INVALID_TRACKNUMBER // the tracknumber given is invalid
} NERO_IMPORT_DATA_TRACK_RESULT;
/*
// Create a NERO_ISO_ITEM tree from an already existing ISO track in order to create a new session
// with reference to files from older sessions
// *ppCDStamp will be filled with a pointer on a CDStamp object which will have to be freed later
// *pInfo will be filled with information about the imported track
// *result will contain a result flag, may be NULL
// (NeroAPI>=6.0.0.0)
*/
NEROAPI_API NERO_ISO_ITEM *NADLL_ATTR NeroImportDataTrack( NERO_DEVICEHANDLE pRecorder,
DWORD trackNumber,
void **ppCDStamp,
NERO_IMPORT_DATA_TRACK_INFO *pInfo,
DWORD flags,
NERO_IMPORT_DATA_TRACK_RESULT *result,
void *reserved); // Must be NULL
#define NIITEF_IMPORT_ROCKRIDGE (1<<0) // Will be ignored, RockRidge is now always imported if present
#define NIITEF_IMPORT_ISO_ONLY (1<<1)
#define NIITEF_PREFER_ROCKRIDGE (1<<2) // Will be ignored
#define NIITEF_IMPORT_UDF (1<<3) // Import UDF Session
#define NIITEF_IMPORT_VMS_SESSION (1<<4) // treat trackNumber as the virtual multisession session specifier
// Free a CD stamp allocated by NeroImportIsoTrackEx
NEROAPI_API void NADLL_ATTR NeroFreeCDStamp(void *pCDStamp);
// Create a file system container for the NERO_FILE_SYSTEM_CONTAINER_MEDIA compilation type
#ifdef __cplusplus
namespace FileSystemContent
{
struct IFileSystemDescContainer;
};
#else //__cplusplus
struct IFileSystemDescContainer;
#endif//__cplusplus
NEROAPI_API
#ifdef __cplusplus
FileSystemContent::
#else //__cplusplus
struct
#endif//__cplusplus
IFileSystemDescContainer *NADLL_ATTR NeroCreateFileSystemContainer(void *reserved);
/*
// Recording functions:
*/
typedef enum
{
NERO_ET_FILE, /* read/write to/from WAV file. */
NERO_ET_IO_CALLBACK, /* exchange data with application directly */
NERO_ET_FILE_MP3, /* read from MP3 file (not for DAE) */
NERO_ET_FILE_WMA, /* read from MS audio file (not for DAE) */
NERO_ET_FILE_RAW, /* for a Freestyle compilation,
* this and NERO_ET_IO_CALLBACK
* are the only types allowed
* at the moment.
* It will expect files
* to be in the format
* as to be written to the disc.
* This exchange type is valid
* for freestyle compilations only */
NERO_ET_AUDIO_FILE /* NeroAPI > 5.5.9.8: audio file created with the plugin manager*/
} NERO_DATA_EXCHANGE_TYPE;
typedef void * NERO_AUDIO_ITEM_HANDLE;
typedef struct tagNERO_AUDIO_ITEM_INFO
{
NERO_AUDIO_ITEM_HANDLE naiiAudioItem;
const char *naiiFileName;
} NERO_AUDIO_ITEM_INFO;
/* use PCM, 44.1kHz, Stereo (left channel first), 16 bits per channel, LSB,
when exchanging data with the NeroAPI */
typedef struct tag_NERO_DATA_EXCHANGE
{
NERO_DATA_EXCHANGE_TYPE ndeType;
union
{
char ndeFileName[256]; // Deprecated, use ndeLongFileName.ptr instead
struct
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -