ClaimMediaLabel Callback Function

[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]

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


DWORD WINAPI ClaimMediaLabel(
  __in   const BYTE const *pBuffer,
  __in   const DWORD nBufferSize,
  __out  MediaLabelInfo const *pLabelInfo


  • pBuffer [in]
    Pointer to a buffer that contains the media label.

  • nBufferSize [in]
    Size of the buffer, in bytes.

  • pLabelInfo [out]
    Pointer to a MediaLabelInfo structure. The media label library fills in this structure if the library recognizes the media label.

Return Value

This function returns one of the following values.

Value Meaning

The media label library filled in the MediaLabelInfo structure.


The media label library does not recognize the media label.



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.


Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

End of client support

Windows Vista

End of server support

Windows Server 2008



See Also

Media Label Library Functions




Send comments about this topic to Microsoft

Build date: 6/9/2011