Threading and COM Objects

OLE DB Programmer's Reference

OLE DB supports two kinds of COM objects in columns and parameters: storage objects and IPersist* objects.

Rowsets are factories of storage objects and determine the threading model of these objects. While accessing a storage object through IRowset::GetData, free-threaded rowsets return free-threaded objects, and apartment rowsets return apartment objects that will belong to the same thread.

IPersist* objects are implemented by the other parties. Their threading model is dictated by threading marking of their class factory. This marking may be absent, and if present, it can be either "Apartment" or "Both." Consumers need mechanisms to obtain information about the IPersist* object's threading marking when IRowset::GetData returns the object.

For more information about storage objects and IPersist* objects, see Chapter 7: BLOBs and COM Objects.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net