Platform SDK: Exchange 2000 Server

Source Property

[This is preliminary documentation and subject to change.]

The reference to the currently bound object.

[Visual Basic,VBScript]
Property Source as Object
Read-only
[C++]
HRESULT get_Source(IUnknown** pVal):
[IDL]
HRESULT [propget] Source([out,retval] IUnknown** pVal);

Remarks

There is a distinction between being bound to an object, and being bound to a item in a store such as Active Directory or the Web Store. This property returns the reference to a currently bound object. For example, if you previously bound a BodyPart object, the Source property would return the IUnknown interface on that object. However, if you are directly bound to an item in a store such as Active Directory or a Web Store, the Source property returns nothing. You can check whether there is a currently bound object using the IDataSource.SourceClass property. If this property returns the empty string, there is not a currently bound object.

Interfaces exposed on the bound object may not be OLE Automation compatible, and the bound object may not expose the IDispatch interface. If you are developing an application using a mix of languages such as C++, Visual Basic and script, check the IDataSource.SourceClass property before attempting to use the Source property. You must make sure the bound object supports the necessary interfaces for the particular language. For example, an implementation of the IDataSource interface may support binding to an object exposing the IStream interface. Visual Basic applications cannot use this interface. Most likely, the object exposing IStream also does not expose the IDispatch interface, ruling out use by scripting languages altogether.

[C++]

This property returns the IUnknown interface on the currently bound object. You can check the IDataSource.SourceClass to identify the name of the interface used to bind the object and may assume that this interface is supported. However, you must call QueryInterface to navigate to this interface on the object and you cannot assume that the returned reference can be statically "cast" to the interface type used to originally bind the object. This is especially important if the object on which you are invoking IDataSource methods resides in a separate COM apartment.