immediatebind attribute
The [immediatebind] attribute indicates that the database will be notified immediately of all changes to a property of a data-bound object.
[
interface-attribute-list
]
interface | dispinterface interface-name
{
[bindable, immediatebind[, optional-attribute-list]] returntype function-name(params)
}
-
interface-attribute-list
-
Specifies a list of one or more attributes that apply to the interface as a whole.
-
interface-name
-
Specifies the name of the interface or dispinterface.
-
optional-attribute-list
-
Zero or more function attributes.
-
returntype
-
Specifies the return type of the function.
-
function-name
-
Specifies the name of the function in the IDL file.
-
params
-
Zero or more function parameters.
The [immediatebind] attribute allows controls to differentiate between properties that need to notify the database of every change, and those that do not. For example, every change to a checkbox control should be sent to the underlying database immediately, even if the control has not lost the focus. However, for a listbox control, a change occurs whenever a different selection is highlighted. Notifying the database of a change before the control loses focus would be inefficient and unnecessary. The [immediatebind] attribute allows you to specify, by setting the ImmediateBind bit, individual properties on a form whose changes should be reported immediately.
Properties that have the [immediatebind] attribute must also have the [bindable] attribute.
FUNCFLAG_FIMMEDIATEBIND, VARFLAG_FIMMEDIATEBIND
[
uuid(12345678-1234-1234-1234-123456789ABC)
]
interface MyObject : IUnknown
{
properties:
methods:
[id(1), propget, bindable, immediatebind] long Size(void);
[id(1), propput, bindable,
immediatebind] HRESULT Size([in]long lSize);
}