📄 neroapi.h
字号:
typedef struct tag_NERO_FILESYSTEMTRACK_OPTIONS
{
DWORD netsStructureSize; /* fill this with sizeof(NERO_FILESYSTEMTRACK_OPTIONS) */
/*
* The following three entries need to be filled out whenever the file system size is to be calculated
* accurately.
*/
void * netspCDStamp; /* Point on a CDStamp object when appending to an existing medium, otherwise NULL */
NERO_MEDIA_TYPE netsMediaType; /* The media type the file system is to be written to */
NERO_DEVICEHANDLE netsDeviceHandle; /* device handle representing the drive the file system is to be written to */
DWORD netsFlags; /* NBF_XXXX that will be used for the recording process */
#ifdef __cplusplus
FileSystemContent::
#else //__cplusplus
struct
#endif//__cplusplus
IFileSystemDescContainer *netsFSContainer; /* if not NULL, the file system will be created from this
* object instead of the passed CNeroIsoTrack object. pIsoTrack must be NULL in this case */
DWORD netsFSContainerFlags; /* NCITEF_XXXX flags to be used for filesystem creation. Used only when netsFSContainer
* is used to create the file system */
DWORD netsReserved[32]; /* Should be zero */
} NERO_FILESYSTEMTRACK_OPTIONS;
/* NeroAPI >= 6.0.0.14: Estimate the total size of a track including data and overhead
* for the filesystem. The method returns the size in blocks.
* Use the flags below to specify what exactly has to be taken into account for the
* calculation.
*
* Warning: Depending on the parameters passed, the returned size might only be an estimation!
*/
NEROAPI_API unsigned int NADLL_ATTR NeroEstimateTrackSize(struct CNeroIsoTrack *pIsoTrack // the iso track for which to calculate the size
, DWORD dwFlags // combination of the flags below
, NERO_FILESYSTEMTRACK_OPTIONS *pOptions);
#define NETS_FILESYSTEM_OVERHEAD (1<<0) /* calculate filesystem overhead */
#define NETS_DATA (1<<1) /* calculate size of the data */
#define NETS_EXACT_SIZE (1<<2) /* Nero >= 6.0.0.21 calculate exactly.
* If this option is specified, filesystem overhead as well as file data is taken into account
* the optional fields of the NERO_ESTIMATETRACKSIZE_OPTIONS structure need to be filled out */
/*
// Digital Audio Extraction functions:
// - aborting will not be reported by NeroGetLastError()
// - incomplete target files are not deleted
// - the function will return 0 for success, else error
*/
NEROAPI_API
int NADLL_ATTR NeroDAE(NERO_DEVICEHANDLE aDeviceHandle,
DWORD dwTrackStartBlk,
DWORD dwTrackLengthInBlks,
const NERO_DATA_EXCHANGE *pDestDataExchg,
DWORD iSpeedInX, // speed of extraction, 0 means maximum speed
NERO_CALLBACK* pNeroProgressCallback); /* has to be a NERO_PROGRESS_CALLBACK */
//
// Utility functions:
//
NEROAPI_API int NADLL_ATTR NeroIsDeviceReady(NERO_DEVICEHANDLE aDeviceHandle); // returns a value of NERO_DRIVE_ERROR
NEROAPI_API int NADLL_ATTR NeroEjectLoadCD(NERO_DEVICEHANDLE aDeviceHandle,BOOL eject); // returns a value of NERO_DRIVE_ERROR
// NeroAPI >= 6.0.0.25:
// Set the image file for the image recorder. This can be used to initialize
// the image recorder for packet writing.
// If imageFilePath is NULL, the last opened file is closed.
NEROAPI_API int NADLL_ATTR NeroInitImageRecorder(NERO_DEVICEHANDLE aDeviceHandle, const char *imageFilePath, DWORD dwFlags, NERO_MEDIA_TYPE mediaType, void *reserved);
// NeroAPI>=5.5.9.10: Get localized WAIT_CD text
// Returned string must be released using NeroFreeMem()
// Function may return NULL if type is out of range
NEROAPI_API char * NADLL_ATTR NeroGetLocalizedWaitCDTexts (NERO_WAITCD_TYPE type);
// NeroAPI >= 6.0.0.25: Use the nstUserDialog callback functions to request a CD
// Returns FALSE if the burn process should be aborted
NEROAPI_API BOOL NADLL_ATTR NeroWaitForDisc(NERO_DEVICEHANDLE aDeviceHandle
,NERO_MEDIA_SET nmt // media types requested
,DWORD dwBurnFlags // Set of NBF_ flags
,void *pCDStamp // Optional stamp of requested media
,DWORD dwFlags // Set of NWFD_ flags
,void *reserved); // must be NULL
#define NWFD_REQUIRE_EMPTY_DISC (1<<0)
// CDRW erasing functions
typedef enum
{
NEROAPI_ERASE_ENTIRE =0,
NEROAPI_ERASE_QUICK =1,
} NEROAPI_CDRW_ERASE_MODE;
NEROAPI_API int NADLL_ATTR NeroGetCDRWErasingTime(NERO_DEVICEHANDLE aDeviceHandle,NEROAPI_CDRW_ERASE_MODE mode);
// Returns estimated blanking time for loaded CD-RW in seconds,
// -1 if no CD inserted,
// -2 if recorder doesn't support CDRW
// -3 if the inserted media is not rewritable
// Erase the disc inserted in the given recorder
NEROAPI_API int NADLL_ATTR NeroEraseDisc(NERO_DEVICEHANDLE aDeviceHandle,NEROAPI_CDRW_ERASE_MODE mode
,DWORD dwFlags,void *reserved);
#define NEDF_DISABLE_EJECT (1<<0) /* NeroAPI>=6.0.0.0: CD will not be ejected at the end of the
erasing, even if this is recommanded for the selected recorder*/
#define NEDF_EJECT_AFTER_ERASE (1<<1) /* NeroAPI > 6.0.0.0: eject disc after erasing, no matter if this is
recommended for the recorder or not */
typedef enum
{
NDR_DRIVE_IN_USE=0,
NDR_DRIVE_NOT_IN_USE,
NDR_DISC_REMOVED,
NDR_DISC_INSERTED,
NDR_DRIVE_REMOVED,
NDR_DRIVE_ADDED
} NERO_DRIVESTATUS_RESULT;
/*
// callback that is called to tell the application about a status change of a drive
// hostID corresponds to the nsdiHostAdapterNo and targetID corresponds
// to the nsdiDeviceID of NERO_SCSI_DEVICE_INFO
// Note: The callback need to be thread safe, since it might be called from a different thread
*/
typedef void (NERO_CALLBACK_ATTR *NERO_DRIVESTATUS_CALLBACK)(int hostID, int targetID, NERO_DRIVESTATUS_RESULT result, void *pUserData);
typedef enum
{
// the disc in the drive has been changed
// Warning: This change notification is based on Windows notifying about
// medium changes. If an application has disabled this notification, the
// callback will not be called. If you want to be sure to recognize all
// medium changes, you should use timer events and use NeroIsDeviceReady
// to ask for the drive status.
NDT_DISC_CHANGE,
NDT_IN_USE_CHANGE // the in-use status of the drive has been changed
} NERO_DRIVESTATUS_TYPE;
/* NeroAPI >= 6.0.0.0:
// Register a callback which is called whenever the specified status
// of a drive is changed.
//
// Please see documentation of NERO_DRIVE_STATUS_TYPE for restrictions of the
// notifications.
//
//
// Parameters:
// status: the status the application is interested in
// pDeviceInfo: the drive for which the status change should be notified.
// The pointer can be freed afterwards.
// callback: the callback to be called if the status changed.
// Note: The callback need to be thread safe, since it might be called from a different thread
// pUserData: data passed to the callback
//
// returns 0 on success
*/
NEROAPI_API int NADLL_ATTR NeroRegisterDriveStatusCallback(NERO_DRIVESTATUS_TYPE status
, const NERO_SCSI_DEVICE_INFO *pDeviceInfo
, NERO_DRIVESTATUS_CALLBACK callback
, void *pUserData);
/* NeroAPI >= 6.0.0.0:
// Unregister a callback
//
// Parameters:
// status: the status for which the callback has been registered
// pDeviceInfo: the drive for which the status was notified
// The pointer does not need to be the same as in
// NeroRegisterDrivestatusCallback, but has to represent
// the same drive.
// callback: the callback to be called if the status changed.
// pUserData: data passed to the callback
//
// returns 0 on success
*/
NEROAPI_API int NADLL_ATTR NeroUnregisterDriveStatusCallback(NERO_DRIVESTATUS_TYPE status // the status the application is interested in
, const NERO_SCSI_DEVICE_INFO *pDeviceInfo // the drive for which the status should be acknowledged
, NERO_DRIVESTATUS_CALLBACK callback // the callback to be called if the status changed
, void *pUserData); // data passed to the callback
/*
// NeroAPI >= 6.0.0.0:
// Register a callback which is called whenever a drive was removed or added in the system
// Use NeroGetAvailableDrivesEx to get the current list of drives in the system.
//
// NOTE: In some rare cases NeroAPI does not get this information from the OS and will therefore
// never notify the callback if a drive has been added/removed.
//
// Parameters:
// callback: the callback to be called when a drive is removed or added
// Note: The callback need to be thread safe, since it might be called from a different thread
// pUserData: data passed to the callback
//
// returns 0 on success
*/
NEROAPI_API int NADLL_ATTR NeroRegisterDriveChangeCallback( NERO_DRIVESTATUS_CALLBACK callback
, void *pUserData);
/*
// NeroAPI >= 6.0.0.0:
// Unregister a callback which was registered with NeroRegisterDriveChangeCallback
//
// Parameters:
// callback: the callback to be called when a drive is removed or added
// pUserData: data passed to the callback
//
// returns 0 on success
*/
NEROAPI_API int NADLL_ATTR NeroUnregisterDriveChangeCallback(NERO_DRIVESTATUS_CALLBACK callback
, void *pUserData);
// NeroAPI > 5.5.9.8: AUDIO SUPPORT
// NERO_CONFIG_RESULT
typedef enum
{
NCR_CANNOT_CONFIGURE,
NCR_CHANGED,
NCR_NOT_CHANGED
} NERO_CONFIG_RESULT;
////////////////////////////////////////////////////// NERO_AUDIO_FORMAT_INFO //
typedef struct tagNERO_AUDIO_FORMAT_INFO
{
// Data
// smth. like "RIFF PCM WAV format"
char nafiDescription[256],
// smth. like "wav,wave,riff"
nafiExtList[256];
BOOL nafiTgt, // Contains TRUE if this is a target plugin
nafiConfigurable; // ConfigureItem will fail on items of
// this type if this member == false
}
NERO_AUDIO_FORMAT_INFO;
//////////////////////////////////////////////////////////// Helper functions //
NEROAPI_API NERO_AUDIO_ITEM_HANDLE NeroAudioCreateTargetItem(int iFormatNumber);
NEROAPI_API BOOL NeroAudioCloseItem(NERO_AUDIO_ITEM_HANDLE hItem);
// Insead of hItem a value of NULL can be passed to configure the
// whole plugin manager.
NEROAPI_API NERO_CONFIG_RESULT NeroAudioGUIConfigureItem \
(NERO_AUDIO_ITEM_HANDLE *phItem, int iNum);
// As soon as it returns false, it means that there are no more formats.
NEROAPI_API BOOL NeroAudioGetFormatInfo \
(int iNum, NERO_AUDIO_FORMAT_INFO *pFI);
//
// Deprecated functions. Present for compatibility with previous versions
//
NEROAPI_API DWORD NADLL_ATTR NeroGetAPIVersion(void); /* Returns 1000 for 1.0.0.0 */
NEROAPI_API BOOL NADLL_ATTR NeroSetExpectedAPIVersion(DWORD);
NEROAPI_API NERO_ISO_ITEM *NeroImportIsoTrackEx(NERO_DEVICEHANDLE pRecorder,
DWORD trackNumber,
void **ppCDStamp,
DWORD flags);
NEROAPI_API int NADLL_ATTR NeroEraseCDRW(NERO_DEVICEHANDLE aDeviceHandle,NEROAPI_CDRW_ERASE_MODE mode); // Erase the loaded CD
// NeroAPI>=5.5.9.4: Use the nstUserDialog callback functions to request a CD
// Returns FALSE if the burn process should be aborted
NEROAPI_API BOOL NADLL_ATTR NeroWaitForMedia(NERO_DEVICEHANDLE aDeviceHandle
,NERO_MEDIA_SET nms // media types requested
,DWORD dwFlags // Set of NBF_ flags
,void *pCDStamp); // Optional stamp of requested media
#ifdef __cplusplus
}
#endif
#if defined(__BORLANDC__)
#pragma pack(pop)
#pragma option pop
#endif
#endif // _NEROAPI_
//======================================================
// NeroApi.h
//======================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -