IWMPropertyVault::GetPropertyByName method

The GetPropertyByName method retrieves a property from the vault by its name.

Syntax

HRESULT GetPropertyByName(
  LPCWSTR           pszName,
  WMT_ATTR_DATATYPE *pType,
  BYTE              *pValue,
  DWORD             *pdwSize
);

Parameters

pszName

Pointer to a null-terminated string containing the name of the property to be retrieved.

pType

Pointer to a member of the WMT_ATTR_DATATYPE enumeration type. This parameter specifies the type of data pointed to by pValue.

pValue

Pointer to a data buffer containing the value of the property. This value can be one of several types. The type of data that the buffer contains on output is specified by the value of pType.

pdwSize

Pointer to a DWORD containing the size, in bytes, of the data at pValue.

Return value

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

Return code Description
S_OK
The method succeeded.
E_INVALIDARG
pszName or pdwSize or pType is NULL.

OR

pszName contains an invalid property name.

ASF_E_BUFFERTOOSMALL
pdwSize specifies a size for pValue that is not large enough to hold the data.

Remarks

You must make two calls to GetPropertyByName to properly retrieve the value of the property. On the first call, pass NULL for pValue. When the call returns, pdwSize will point to the correct sizes of the buffer. Then on the second call, pass a properly sized buffer as pValue to receive the data.

Requirements

   
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 (include Wmsdk.h)
Library Wmvcore.lib; WMStubDRM.lib (if you use DRM)

See also

IWMPropertyVault Interface

IWMPropertyVault::GetPropertyByIndex

IWMPropertyVault::SetProperty