IProvHelper::QueryProperty


Queries the property bag for the value of a key name/value pair and returns the property. Used by providers that interact with Microsoft. Provisioning Framework (MPF).

Syntax

C++
HRESULT QueryProperty  (
	BSTR bstrKey,
	VARIANT* pvValue
);
Visual Basic
Function QueryProperty ( _
	bstrKey As String _
) As Variant

Parameters

bstrKey
Key name.
pvValue (C++) / return value (VB)
Returned value.

Return Codes

Zero indicates success; a non-zero value represents an error. For a list of error codes, see MPF Errors.

C++ Example

BSTR bstrKey;
VARIANT vValue;
HRESULT hr = E_OUTOFMEMORY;

bstrKey = ::SysAllocString(L"key");
::VariantInit(&vValue);

if(bstrKey)
	hr = m_pProvHelper->QueryProperty(bstrKey, &vValue);

::SysFreeString(bstrKey);
::VariantClear(vValue);

Visual Basic Example

Dim strKey
Dim vValue

strKey = "key"
vValue = mProvHelper.QueryProperty(strKey)

See Also

AddProperty, DeleteProperty, IProvHelper


Up Top of Page
) 1999-2002 Microsoft Corporation. All rights reserved.