Take a look at the NeroGetCDInfo API.
Quote:
Retrieve a pointer to a NERO_CD_INFO structure for the specified device. The
allocated memory for the structure has to be freed by using NeroFreeMem. NULL
will be returned if an error occurred.
Note: When queried about DVD+RW media, most recorders will return the total
capacity of the media, even if parts of it already contain data.
Therefore, when dealing with DVD+RW media, NeroGetVMSInfo should be called
after NeroGetCDInfo. NeroGetVMSInfo returns a pointer to a NERO_VMS_INFO
structure. This structure contains the next writeable address in the
“nvmsiNextWriteableAddress” member. This information can be utilized to
determine what portion of the media already is in use.
|
And the NERO_CD_INFO structure:
Quote:
typedef struct tag_NERO_CD_INFO
{
DWORD ncdiFreeCapacityInBlocks;
BOOL ncdiIsWriteable;
NERO_MEDIUM_TYPE ncdiMediumType;
char ncdiArtist[65];
char ncdiTitle[65];
DWORD ncdiAvailableEraseModes;
DWORD ncdiUnusedBlocks;
NERO_MEDIA_TYPE ncdiMediaType;
DWORD ncdiMediumFlags;
DWORD ncdiLayer0MaxBlocks;
DWORD ncdiTotalCapacity;
DWORD ncdiReserved[26];
DWORD ncdiNumTracks;
NERO_TRACK_INFO ncdiTrackInfos[1];
} NERO_CD_INFO;
|
You may assume a block size of 2048 bytes for ISO data CDs. I do not know whether this applies also to other media/types.