IProvHelper::SetRollbackData
Saves rollback data to a transaction log. Used by providers that interact with Microsoft. Provisioning Framework (MPF).
Rollback data is not saved until the provider procedure completes successfully or explicitly calls FlushRollbackData. During the IProvProvider::RollbackRequest call, data is retrieved using GetRollbackData.
Syntax
C++ HRESULT SetRollbackData ( BSTR bstrKey, VARIANT vValue );Visual Basic Sub SetRollbackData ( _ bstrKey As String, _ vValue As Variant _ )Parameters
- bstrKey
- Key name.
- pvValue
- Value associated with the key.
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"fileName"); vValue.bstrVal = ::SysAllocString(L"sample.txt"); vValue.vt = VT_BSTR; if(bstrKey && vValue.bstrVal) hr = m_pProvHelper->SetRollbackData(bstrKey, vValue); ::SysFreeString(bstrKey); ::VariantClear(vValue);Visual Basic Example
Dim strKey Dim vValue strKey = "fileName" vValue = "sample.txt" Call mProvHelper.SetRollbackData(strKey, vValue)See Also
Top of Page
) 1999-2002 Microsoft Corporation. All rights reserved.