⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 neroapi.h

📁 用VC开发的nero刻录程序
💻 H
📖 第 1 页 / 共 5 页
字号:
	// If value is NULL, 16 bit unicode volume label is disabled, otherwise enabled.
	NEROAPI_OPTION_ALLOW_16BITUNICODE_DVDVIDEO_VOLUMELABEL

} NEROAPI_OPTION;

NEROAPI_API int NADLL_ATTR NeroSetOption(NEROAPI_OPTION option,void *value);


/*
// Code to scan the SCSI/IDE bus and get information about
// the available WORM/CDROM drives:
*/

typedef enum
{       
	NEA_SCSI_DEVTYPE_UNKNOWN,
	NEA_SCSI_DEVTYPE_WORM,      /* can write */
	NEA_SCSI_DEVTYPE_CDROM,     /* can only read */
	NEA_SCSI_DEVTYPE_UNSUPPORTED_WORM	/* can write but is not supported by NeroAPI */
} NEROAPI_SCSI_DEVTYPE;

typedef struct tag_NERO_SPEED_INFOS
{
	DWORD nsiNumSupportedSpeeds;     /* 1 if the speed cannot be changed */
	DWORD nsiBaseSpeedKBs;			 /* Speed corresponding to 1X for the selected media in KB/s */
	DWORD nsiSupportedSpeedsKBs[64]; /* List of possible speeds in KB/s */
	DWORD nsiSupportedSpeeds[64];    /* List of possible speeds in multiple of 150KB/s (1X for CD) (present for compatibility) */
	DWORD nsiReserved[32];
} NERO_SPEED_INFOS;

typedef enum tag_NERO_MEDIA_TYPE
{
	MEDIA_NONE				=	0,								// No media present (NeroAPI>=5.5.9.4)
	MEDIA_CD				=	0x00001,						// CD-R/RW
	MEDIA_DDCD				=	0x00002,						// DDCD-R/RW
	MEDIA_DVD_M				=	0x00004,						// DVD-R/RW
	MEDIA_DVD_P				=	0x00008,						// DVD+RW
	MEDIA_DVD_RAM			=	0x00010,						// DVD-RAM
	MEDIA_ML				=	0x00020,						// ML (Multi Level disc)
	MEDIA_MRW				=	0x00040,						// Mt. Rainier

	//NeroAPI>=5.5.9.4:
	MEDIA_NO_CDR			=	0x00080,						// Exclude CD-R
	MEDIA_NO_CDRW			=	0x00100,						// Exclude CD-RW
	MEDIA_CDRW				=   MEDIA_CD|MEDIA_NO_CDR,			// CD-RW		
	MEDIA_CDR				=   MEDIA_CD|MEDIA_NO_CDRW,			// CD-R
	MEDIA_DVD_ROM			=	0x00200,						// DVD-ROM (non writable)
	MEDIA_CDROM				=	0x00400,						// CD-ROM (non writable)

	//NeroAPI>=5.5.9.10
	MEDIA_NO_DVD_M_RW		=	0x00800,						// Exclude DVD-RW
	MEDIA_NO_DVD_M_R		=	0x01000,						// Exclude DVD-R
	MEDIA_NO_DVD_P_RW		=	0x02000,						// Exclude DVD+RW
	MEDIA_NO_DVD_P_R		=	0x04000,						// Exclude DVD+R
	MEDIA_DVD_M_R			=	MEDIA_DVD_M|MEDIA_NO_DVD_M_RW,	// DVD-R
	MEDIA_DVD_M_RW			=	MEDIA_DVD_M|MEDIA_NO_DVD_M_R,	// DVD-RW
	MEDIA_DVD_P_R			=	MEDIA_DVD_P|MEDIA_NO_DVD_P_RW,	// DVD+R
	MEDIA_DVD_P_RW			=	MEDIA_DVD_P|MEDIA_NO_DVD_P_R,	// DVD+RW
	MEDIA_FPACKET			=   0x08000,						// Fixed Packetwriting
	MEDIA_VPACKET			=	0x10000,						// Variable Packetwriting
	MEDIA_PACKETW			=	MEDIA_MRW|MEDIA_FPACKET			// a bit mask for packetwriting
									|MEDIA_VPACKET,
	//NeroAPI>=5.5.10.4
	MEDIA_HDB				=	0x20000,						// HD-Burn

	//NeroAPI>=6.0.0.29
	MEDIA_DVD_P_R9			=	0x40000,						// DVD+R Double Layer 9GB
	//NeroAPI>=6.6.0.8
	MEDIA_DVD_M_R9			=	0x80000,						// DVD-R Dual Layer 9GB
	MEDIA_DVD_ANY_R9		=	MEDIA_DVD_P_R9|MEDIA_DVD_M_R9,	// Any DVD Dual/Double Layer 9GB
	MEDIA_DVD_ANY			=	MEDIA_DVD_M|MEDIA_DVD_P|MEDIA_DVD_RAM|MEDIA_DVD_ANY_R9, // Any DVD-Media

	//NeroAPI>=6.6.0.8
	MEDIA_BD_ROM			=	0x100000,						// Blu-ray Disc ROM
	MEDIA_BD_R				=	0x200000,						// Blu-ray Disc Recordable
	MEDIA_BD_RE				=	0x400000,						// Blu-ray Disc Rewritable
	MEDIA_BD				=	MEDIA_BD_R | MEDIA_BD_RE,		// Any recordable Blu-ray Disc media
	MEDIA_BD_ANY			=	MEDIA_BD|MEDIA_BD_ROM,			// Any Blu-ray Disc media

	//NeroAPI>=6.6.0.1001
	MEDIA_HD_DVD_ROM		=	0x0800000,						// HD DVD ROM
	MEDIA_HD_DVD_R			=	0x1000000,						// HD DVD Recordable
	MEDIA_HD_DVD_RW			=	0x2000000,						// HD DVD Rewritable
	MEDIA_HD_DVD			=	MEDIA_HD_DVD_R|MEDIA_HD_DVD_RW,	// Any recordable HD DVD media
	MEDIA_HD_DVD_ANY		=	MEDIA_HD_DVD|MEDIA_HD_DVD_ROM,	// Any HD DVD media
} NERO_MEDIA_TYPE;

typedef DWORD NERO_MEDIA_SET;	// Represents a set of several medias

typedef struct tag_NERO_SCSI_DEVICE_INFO
{
	char                nsdiDeviceName[64];
	char                nsdiHostAdapterName[4];
    char                *nsdiLongHostAdapterName;	/* NeroAPI >= 6.6.0.10: Unlimited host adapter name */
													/* Adapter names can be more than 8 chars, therefore we define a pointer */
													/* that has to be freed afterwards with NeroFreeMem. */
													/* This pointer will be filled only if specific option is passed to */
													/* NeroGetAvailableDevicesEx(), and the 'old' field will be then zeroed. */
	DWORD               nsdiHostAdapterNo; 
	DWORD               nsdiDeviceID;
	NEROAPI_SCSI_DEVTYPE nsdiDevType;
	char                nsdiDriveLetter;        /* Windows drive letter or 0 if not available */

	DWORD				nsdiCapabilities;       /* drive capabilities: */
#define NSDI_ALLOWED				(1<<0)      /* the drive can only be used if this bit is set */
#define NSDI_DAO                    (1<<1)      /* can write in DAO. */
#define NSDI_READ_CD_TEXT           (1<<2)      /* can read CD text */
#define NSDI_VARIABLE_PAUSES_IN_TAO (1<<3)      /* see natPauseInBlksBeforeThisTrack below */
#define NSDI_DAO_WRITE_CD_TEXT      (1<<4)      /* writes CD text in DAO (see natArtist/Title); never supported in TAO */
#define NSDI_IMAGE_RECORDER			(1<<6)		/* drive is the image recorder */
#define NSDI_UNDETECTED				(1<<7)
#define NSDI_IDE_BUS				(1<<8)
#define NSDI_SCSI_BUS				(1<<9)
#define NSDI_BUF_UNDERRUN_PROT		(1<<10)		/* drive has a buffer underrun protection feature (not necessary Burn Proof) */
#define NSDI_RESERVED				(1<<11)		/* Must not be used */
#define NSDI_RESERVED2				(1<<12)		/* Must not be used */
#define NSDI_ALLOW_CHANGE_BOOKTYPE	(1<<13)		/* NeroAPI >5.5.10.7: DVD recorder can change booktype of burned medium */
#define NSDI_DVDPLUSVR_SUPPORTED    (1<<14)     /* NeroAPI >= 6.0.0.0: This recorder can write DVD+VR */
#define NSDI_OVERBURN_SUPPORTED     (1<<15)     /* NeroAPI >= 6.6.0.10: The device supports overburn. */
#define NSDI_RESERVED3              (1<<16)     /* Must not be used */
#define NSDI_BURN_30MM_AT_LEAST     (1<<17)     /* NeroAPI >= 6.6.1.0: Device can burn 30mm at least to be compatible with dvd-rom */
#define NSDI_RESERVED4              (1<<18)     /* Must not be used */
#define NSDI_ULTRARAW_96            (1<<19)     /* NeroAPI >= 6.6.1.0: Device UltraRaw 96 support */  
#define NSDI_RESERVED5              (1<<20)     /* Must not be used */

	NERO_SPEED_INFOS    nsdiReadSpeeds;
	NERO_SPEED_INFOS    nsdiWriteSpeeds;
	const void         *nsdiDriver;             /* opaque identifier of the internal driver, required by NeroOpenDevice() */
	char		nsdiBufUnderrunProtName[64];	/* Buffer underrun protection technology name */
												/* The string will be empty if the technology has no name */
	DWORD				nsdiMandatoryBUPSpeed;	/* it is highly recommanded to enable buffer
												   underrun protection protection when burning at this speed or
												   faster. Contains 0 if there is no recommandation */
	NERO_MEDIA_SET		nsdiMediaSupport;		/* NeroAPI>=5.5.4.1: Bit field of supported writable media (constructed with the NERO_MEDIA_TYPE enum)*/

	DWORD				nsdiDriveBufferSize;	/* NeroAPI>=5.5.9.4: Drive buffer size (internal) in KB */
	
	DWORD				nsdiDriveError;			/* NeroAPI>=6.0.0.0: Contains a NERO_DRIVE_ERROR that occured during generating the information.
												   If != NDE_NO_ERROR, some information like the drive capabilities or the speeds might be wrong.
												   You can check with NeroIsDeviceReady if the drive is ready later
												   and update the device information with NeroUpdateDeviceInfo.
												   NDE_DISC_NOT_PRESENT* errors can be ignored.
												*/
	NERO_MEDIA_SET		nsdiMediaReadSupport;	/* NeroAPI>=6.0.0.8: Bit field of supported readable media (constructed with the NERO_MEDIA_TYPE enum)*/
	char				nsdiFirmwareRevision[8];/* NeroAPI >= 6.6.0.10: Firmware Revision of the device. Not less than 4 chars, but with a \0 trailing char. */

	DWORD               nsdiReserved[59];       /* Should be zero */
} NERO_SCSI_DEVICE_INFO;

typedef struct tag_NERO_SCSI_DEVICE_INFOS
{
	DWORD nsdisNumDevInfos; /* number of the following entries */
	NERO_SCSI_DEVICE_INFO nsdisDevInfos[1];
} NERO_SCSI_DEVICE_INFOS;

/* Gets a list of available WORM and CDROM devices, free with NeroFreeMem(). */
/* Returns NULL for error */
NEROAPI_API NERO_SCSI_DEVICE_INFOS * NADLL_ATTR NeroGetAvailableDrivesEx(
													NERO_MEDIA_TYPE	mediaType,	// Provide speeds values for this kind of media
													DWORD dwFlags);		        // NeroAPI >= 6.6.0.10: See below for values available
#define NGADE_GET_LONG_HOST_ADAPTER_NAMES        (1<<0) /* NeroAPI >= 6.6.0.10: Provides long host adapter names. nsdiLongHostAdapterName should be freed
														* manually for every NERO_SCSI_DEVICE_INFO structures returned ! */
							 

/* NeroAPI>=6.0.0.0: Update the information about a drive. */
NEROAPI_API NERO_DRIVE_ERROR NADLL_ATTR NeroUpdateDeviceInfo(NERO_SCSI_DEVICE_INFO *devInfo // the device info to update
												, NERO_MEDIA_TYPE mediaType // the media type to update the speed infos with
												, void *reserved); // Must be NULL

/* Get a string describing the given bit field of supported media
   Free with NeroFreeMem();
*/
NEROAPI_API char *NADLL_ATTR NeroGetTypeNameOfMedia(NERO_MEDIA_SET media,void *reserved);

/*
// Open and close a device:
*/
NEROAPI_API NERO_DEVICEHANDLE NADLL_ATTR NeroOpenDevice(const NERO_SCSI_DEVICE_INFO* pDevInfo);  /* NULL for errors */
NEROAPI_API void NADLL_ATTR NeroCloseDevice(NERO_DEVICEHANDLE aDeviceHandle);

/*
// NeroAPI > 5.5.9.10
// Get available write speeds depending on medium type, free with NeroFreeMem().
// Returns NULL for error
*/
  
typedef enum
{
   ACCESSTYPE_WRITE,
   ACCESSTYPE_READ
} NERO_ACCESSTYPE;

NEROAPI_API NERO_SPEED_INFOS * NADLL_ATTR NeroGetAvailableSpeeds(NERO_DEVICEHANDLE aDeviceHandle,
							       NERO_ACCESSTYPE accessType,
							       NERO_MEDIA_TYPE mediaType,
							       void *reserved);

/*
 * NeroAPI >= 6.3.1.20e
 * Booktype settings
 */
typedef enum tag_BookTypeSettings
{
	BTS_PHYSICAL_DISC_TYPE	= 0,	// Set booktype to physical disc type. E.g. if a DVD+R is loaded the booktype is set to DVD+R.
	BTS_DVD_ROM				= 1,	// Set booktype to DVD-ROM for all types of DVDs (DVD+R, DVD+RW, DVD+R9 DL, ...).
	BTS_UNMODIFIED			= 2,	// Don't send any booktype change command to the drive. This is useful, if you have changed the settings on the drive and want to use this setting.
	BTS_AUTOMATIC			= 3		// Let NeroAPI decide, which booktype to use. This may depend from the recorder, medium type and compilation type that is burned.
} NERO_BOOK_TYPE_SETTINGS;

/**
 * NeroAPI >= 7.0.5.6 
 * Spare area allocation for BD-R/RE
 */
typedef enum
{
	SAS_NO_ACTION	= 0,		// Do nothing per default
	SAS_ALLOCATE	= 1,		// Allocate default spare area
	SAS_NO_ALLOCATE = 2			// Do not allocate spare area
}
NERO_SPARE_AREA_SETTINGS;

/*
 * NeroAPI > 5.5.10.7
 * Get and set special low level options of devices
 */
typedef enum
{
	/*
	 * Change booktype in recorder driver to the booktype given in <*value> and
	 * perform changing Booktype on drive so that the booktype of a DVD recordable
	 * disc is changed for subsequent writes until next power cycle.
	 * void* is a pointer to NERO_BOOK_TYPE_SETTINGS in Nero(Set|Get)DeviceOption.
	 *
	 * For setting the booktype to DVD-ROM, set parameter to BTS_DVD_ROM (before
	 * and including NeroAPI 6.3.1.20e: TRUE), to set to physical disc type set
	 * parameter to BTS_PHYSICAL_DISC_TYPE (before and including NeroAPI 6.3.1.20e:
	 * FALSE) and to not change the booktype settings on the drive set the parameter
	 * to BTS_UNMODIFIED. To take effect the flag NBF_NO_BOOKTYPE_CHANGE in NeroBurn
	 * should be set.
	 * In NeroGetDeviceOption, TRUE is returned if the booktype on the drive is set
	 * to DVD-ROM, FALSE otherwise.
	 */
	NERO_DEVICEOPTION_BOOKTYPE_DVDROM = 0,

	/*
	 * Set the number of blocks after that to switch from layer 0
	 * to layer 1 when writing on a double layer medium. 
	 * Notes:
	 * - the number of blocks must be a multiple of 16
	 * - the layer 0 must be >= totalDataSize/2, because there can
	 *   never be more data on layer 1 than on layer 0.
	 *
	 * In NeroSetDeviceOption value is a pointer to a DWORD variable.
	 * In NeroGetDeviceOption a pointer to a DWORD is returned.
	 */
	NERO_DEVICEOPTION_LAYERSWITCH = 1,

	/*
	 * NeroAPI >= 6.0.0.24: 
	 * Set the booktype of the next DVD recordable that is written to the value given
	 * in <*value>. the behaviour is similar as for NERO_DEVICEOPTION_BOOKTYPE_DVDROM
	 * but the change is only made in the recorder driver and not on the drive.
	 * This option is useful, if you do packetwriting.  To take effect when using NeroBurn
	 * the flag NBF_NO_BOOKTYPE_CHANGE should be set.
	 * void* is a pointer to NERO_BOOK_TYPE_SETTINGS in Nero(Set|Get)DeviceOption.
	 * In NeroGetDeviceOption, TRUE is returned if the booktype in the recorder driver
	 * is set to DVD-ROM, FALSE otherwise.
	 */
	NERO_DEVICEOPTION_BOOKTYPE_DVDROM_NEXT_WRITE = 2,

	/*
	 * Set the number of blocks after that to switch from layer 0
	 * to layer 1 when writing on a double layer medium. In difference to
	 * NERO_DEVICEOPTION_LAYERSWITCH the layer break is written
	 * immediately to the disc, while otherwise it is set during burning.
	 * Notes:
	 * - the number of blocks must be a multiple of 16
	 * - the layer 0 must be >= totalDataSize/2, because there can
	 *   never be more data on layer 1 than on layer 0.
	 *
	 * In NeroSetDeviceOption value is a pointer to a DWORD variable.
	 * In NeroGetDeviceOption a pointer to a DWORD specifying any physically
	 * set layer break point on the medium or NULL if no layer break point
	 * has been set as of yet is returned
	 */
	NERO_DEVICEOPTION_BREAK_LAYER = 3,

	/** 
	 * NeroAPI >= 7.0.5.6 
	 * Set/get spare area on BD. 
	 * In NeroSetDeviceOption <*value> is a pointer to NERO_SPARE_AREA_SETTINGS
	 * which will be allocated on the next burning.
	 * In NeroGetDeviceOption <void*> is a pointer to DWORD specifying the number
	 * of allocated spare area sectors. 
	 */
	NERO_DEVICEOPTION_SPARE_AREA = 4
} 
NERO_DEVICEOPTION;

/*
// Set a special option for a device
// returns 0 an success
*/
NEROAPI_API int NADLL_ATTR NeroSetDeviceOption(NERO_DEVICEHANDLE aDeviceHandle,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -