The GetPropertyByName method retrieves a property from the vault by its name.
HRESULT GetPropertyByName( LPCWSTR pszName, WMT_ATTR_DATATYPE *pType, BYTE *pValue, DWORD *pdwSize );
Pointer to a null-terminated string containing the name of the property to be retrieved.
Pointer to a member of the WMT_ATTR_DATATYPE enumeration type. This parameter specifies the type of data pointed to by 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.
Pointer to a DWORD containing the size, in bytes, of the data at pValue.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
||The method succeeded.|
pszName or pdwSize or pType is NULL.
pszName contains an invalid property name.
||pdwSize specifies a size for pValue that is not large enough to hold the data.|
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.
|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]|
|Header||wmsdkidl.h (include Wmsdk.h)|
|Library||Wmvcore.lib; WMStubDRM.lib (if you use DRM)|