Interfaces Implemented by the Data Link Core Component

OLE DB Programmer's Reference

The interfaces in this section are implemented by the Data Link core component. The full API reference entries for these interfaces can be found in the COM documentation in the Platform SDK, which is included in the MSDN Library. Below are implementation notes specific to the Data Link core component.

Methods not implemented on these interfaces will return E_NOTIMPL from a call to the method. If the method is a part of the interface but is not supported, it is not listed below.

IPropertyPageSite

IPropertyPageSite::OnStatusChange

This method is used by the provider's property page to tell the Data Link core component that a value on the page has been updated. This should be called whenever the user changes the value of one of the controls on the property page.

HRESULT OnStatusChange(    DWORD   dwFlags);

Parameters

dwFlags
[in]
Flags to indicate what changes have occurred to the property page.

Flag Meaning
PROPPAGESTATUS_DIRTY Values in the page have changed.
PROPPAGESTATUS_CLEAN Values in the page have not changed.
PROPPAGESTATUS_VALIDATE Now is an appropriate time to apply changes.

IPropertyPageSite::GetLocaleID

Returns the locale identifier so the property page can adjust itself to country-specific settings.

This method is provided so that the provider can determine what language settings are being used. The provider should then use that locale when setting up the pages for display.

HRESULT GetLocaleID(    LCID *   pLocaleID);

Parameters

pLocaleID
[out]
Pointer to locale identifier.

IPropertyPageSite::TranslateAccelerator

Passes a keystroke to the property frame for processing.

This method is implemented by the Data Link user interface so that the provider page, upon receiving a keystroke it doesn't handle, can pass the keystroke on to the property sheet for processing.

HRESULT TranslateAccelerator(    LPMSG   pMsg);

Parameters

pMsg
[in]
Pointer to the MSG structure to be processed.

IPropertyBag

IPropertyBag::Read

Within the provider's IPersistPropertyBag::Load implementation, the provider page is to use IPropertyBag::Read to extract the properties used to load the controls on the page being displayed.

HRESULT Read(    LPCOLESTR     pszPropName,    VARIANT *     pVar,    IErrorLog *   pErrorLog);

Parameters

pszPropName
[in]
Pointer to the name of the property to read. Cannot be NULL.
pVar
[in]
Pointer to the caller-initialized VARIANT that is to receive the property value on output.
pErrorLog
[in]
Currently unused. Should be set to NULL.

IPropertyBag::Write

When the provider receives a request to IPersistPropertyBag::Save, it calls the Write method on the Data Link core component IPropertyBag implementation to save the individual properties that were changed while the page was active.

HRESULT Write(    LPCOLESTR   pszPropName,    VARIANT *   pVar);

Parameters

pszPropName
[in]
Pointer to the name of the property to write. Cannot be NULL.
pVar
[in]
Pointer to the caller-initialized VARIANT that holds the property value to save.

IPropertyPage2

The IPropertyPage2 interface is an extension to IPropertyPage to support initial selection of a property on a page.

IPropertyPage2::EditProperty

Specifies in dispID the property's control located on the property page that will receive the focus when the page is activated.

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