Platform SDK: Removable Storage Manager

ClaimMediaLabel

The ClaimMediaLabel function determines whether a specified media label was created by the media's associated application.

DWORD __stdcall ClaimMediaLabel(
  const BYTE *const pBuffer,
  const DWORD nBufferSize,
  MediaLabelInfo *const pLabelInfo
);

Parameters

pBuffer
Pointer to a buffer that contains the media label.
nBufferSize
Specifies the size of the buffer. Must be equal to the size of pBuffer.
pLabelInfo
Pointer to the MediaLabelInfo data structure. The media label library fills in this structure if the library recognizes the media label.

Return Values

Value Meaning
NO_ERROR The media label library filled in the MediaLabelInfo structure.
ERROR_BAD_FORMAT The media label library does not recognize the media label.

Remarks

When a media label library uses the ClaimMediaLabel function to identify the media label as one created by its associated application, the media label library must fill in the MediaLabelInfo structure and return NO_ERROR. If the media label library does not recognize the media label, it returns ERROR_BAD_FORMAT.

Requirements

  Windows NT/2000: Requires Windows 2000.