Compartir a través de


WMIsContentProtected function (wmsdkidl.h)

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The WMIsContentProtected function checks a file for DRM-protected content. This function is a shortcut so that your application can quickly identify protected files.

Syntax

HRESULT WMIsContentProtected(
  [in]  const WCHAR *pwszFileName,
  [out] BOOL        *pfIsProtected
);

Parameters

[in] pwszFileName

Pointer to a wide-character null-terminated string containing the name of the file to check for DRM-protected content.

[out] pfIsProtected

Pointer to a Boolean value that is set to True on function return if the file contains DRM-protected content.

Return value

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The function succeeded.
E_INVALIDARG
One or both of the parameters are NULL.
S_FALSE
The content is unprotected.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only],Windows Media Format 9 Series SDK, or later versions of the SDK
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wmsdkidl.h
Library Wmvcore.lib
DLL Wmvcore.dll

See also

Functions