IMcObjectsSetNotifyRules Method
|
|
Sets the notify rules for some sink.
Namespace:
MediaCy.IQL.ObjectManager
Assembly:
MediaCy.IQL.ObjectManager (in MediaCy.IQL.ObjectManager.dll) Version: 10.0.6912.0
SyntaxFunction SetNotifyRules (
ckhCookie As IntPtr,
Optional RuleFlags As mcobjNotifyRuleFlags = mcobjNotifyRuleFlags.mcobjNR_NoFlags,
Optional RuleFlagsMask As mcobjNotifyRuleFlags = mcobjNotifyRuleFlags.mcobjNR_AllFlagsMask
) As mcobjNotifyRuleFlags
Parameters
- ckhCookie
- Type: SystemIntPtr
[in] The "cookie" value returned from a previous call to
AttachNotifySinkToCategory, AttachNotifySinkToType or
McObject.AttachNotifySink. The "cookie" will be the same for all
AttachNotify... calls sharing the same notify sink interface instance (the - RuleFlags (Optional)
- Type: MediaCy.IQL.ObjectManagermcobjNotifyRuleFlags
The rules flags. Currently the only
one supported is mcobjNR_NoAddRefSinkInterface, which prevents a reference
from being kept on the notify sink. - RuleFlagsMask (Optional)
- Type: MediaCy.IQL.ObjectManagermcobjNotifyRuleFlags
An optional mask for the rules flags
to change. By default all rule flags are set or cleared by the RuleFlags
argument.
Return Value
Type:
mcobjNotifyRuleFlagsThe new mcobjNotifyRuleFlags rules flags. The existing flags may be
retrieved by calling SetNotifyRules with a RuleFlagsMask argument of
mcobjNR_NoFlags.
RemarksCurrently the only rule that can be set is whether a reference is
held on the notify sink interface while any notify to it is attached.
By default, whenever a notify sink is attached to an McObject instance, Type or
Category (by a call to McObject.AttachNotifySink, AttachNotifySinkToCategory or
AttachNotifySinkToType) a reference (AddRef) is placed on the notify sink
interface. This reference is then released (Release) when the last attached
notify on the sink interface is detached (either by a call to
McObject.DetachNotifySink, DetachNotifySinkFromCategory,
DetachNotifySinkFromType or automatically when the the last notifiying McObject
is removed from the McObjects collection). This reference may sometimes create a
"deadlock" problem, so you may use this SetNotifyRules method to prevent the
AddRef/Release on the notify sink interface. If you do so, you must establish
some other method to keep a reference on the notify sink interface until you
have detached all attached notifies.
See Also