Compartilhar via


Asynchronous Scoped Operations

When calling IScopedOperations::Copy, Delete, or Move, a consumer can request asynchronous processing by setting the DBCOPY_ASYNC bit of dwCopyFlags. (Note: For IScopedOperations::Delete, the DELETE_ASYNC bit of dwDeleteFlags is set instead. For IScopedOperations::Move, the DBMOVE_ASYNC bit of dwMoveFlags is set.) When this flag is set, the provider returns immediately from the call to Copy, Delete, or Move, returning either S_OK, if the operation has completed immediately, or DB_S_ASYNCHRONOUS, if the operation will continue asynchronously. Consumers can call IDBAsynchStatus::GetStatus to get the status of the operation or can register for progress notifications by passing the consumer's IDBAsynchNotify interface to the requested object's connection point. The consumer must explicitly request an asynchronous operation. Otherwise, the call to Copy, Delete, or Move does not return until all requested trees or subtrees have been copied, deleted, or moved as appropriate. If multiple IScopedOperations operations are invoked asynchronously on the same row instance, the behavior of IDBAsynchStatus and IDBAsynchNotify is undefined.