IDiscRecorder::QueryMediaInfo method (imapi.h)

Retrieves information about the currently mounted media, such as the total number of blocks used on the media.

Syntax

HRESULT QueryMediaInfo(
  [out] byte  *pbSessions,
  [out] byte  *pbLastTrack,
  [out] ULONG *ulStartAddress,
  [out] ULONG *ulNextWritable,
  [out] ULONG *ulFreeBlocks
);

Parameters

[out] pbSessions

Number of sessions on the disc.

[out] pbLastTrack

Track number of the last track of the previous session.

[out] ulStartAddress

Start address of the last track of the previous session.

[out] ulNextWritable

Address at which writing is to begin.

[out] ulFreeBlocks

Number of blocks available for writing.

Return value

S_OK is returned on success, but other success codes may be returned as a result of implementation. The following error codes are commonly returned on operation failure, but do not represent the only possible error values:

Remarks

Using this method allows the calculation of parameters such as the amount of free space left on the disc without using a setting on the active disc recorder, which causes an exclusive open. The total size of the disc can be calculated by summing the next writable address and free blocks.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header imapi.h
Library Uuid.lib
DLL Actxprxy.dll

See also

IDiscRecorder