OLE DB Programmer's Reference |
Called by the provider to indicate that asynchronous processing has stopped.
HRESULT OnStop ( HCHAPTER hChapter, DBASYNCHOP ulOperation, HRESULT hrStatus, LPOLESTR pwszStatusText);
Parameters
DBASYNCHOP_OPENThe completion information applies to the asynchronous opening or population of a rowset or to the asynchronous initialization of a data source object.
S_OKThe asynchronous operation completed successfully.
DB_E_CANCELEDThe asynchronous operation was canceled.
E_OUTOFMEMORYThe provider ran out of memory attempting to execute the asynchronous operation.
E_FAILThe asynchronous operation failed for a provider-specific reason.
The provider owns the memory for pwszStatusText. The consumer can copy the text to its own memory but must not attempt to free pwszStatusText nor to reference it after it has returned from IDBAsynchNotify::OnStop.
Return Code
Comments
This method is called once per operation, after all asynchronous phases for that operation have completed. IDBAsynchNotify::OnStop is always called, whether the asynchronous operation succeeded, failed, or was aborted by the consumer.
For operations that complete successfully, IDBAsynchNotify::OnProgress is always called prior to IDBAsynchNotify::OnStop with ulProgress equal to ulProgressMax. The only exception is if the listener has explicitly requested not to receive further IDBAsynchNotify::OnProgress notifications by returning E_NOTIMPL or DB_S_UNWANTEDOPERATION, and if the provider has optimized by not making additional calls to IDBAsynchNotify::OnProgress.
Consumers should be prepared to handle new values of ulOperation by returning S_OK or DB_S_UNWANTEDOPERATION.
ICommand::Execute | IDBAsynchStatus::Abort | IDBAsynchStatus::GetStatus | IDBInitialize::Initialize | IDBSchemaRowset::GetRowset | IOpenRowset::OpenRowset | ISourcesRowset::GetSourcesRowset
1998-2001 Microsoft Corporation. All rights reserved.