Description

Fires a notify to all Attached notify sinks associated with a given IID.

Return Type

A Boolean value.  

TRUE if some IMcObjFireCustomSink.FireTo call returned S_FALSE, and thus the notify loop was aborted early. Otherwise, returns FALSE.

Syntax

object.FireCustomNotify (pimcobjfirecustomsinkGetsFireToCalls, varISinkIIDD, [lNotifyCode])

The FireCustomNotify Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McObject.
pimcobjfirecustomsinkGetsFireToCallsRequired. An IMcObjFireCustomSink object.

A pointer to an McObjFireCustomNotify interface. This is the interface that will get a FireTo call for each notified sink. The IMcObjFireCustomSink.FireTo method will know how to call its piunkSinkToCall argument with the custom notify.

varISinkIID : [in]The ISink interface IID. This may be a VT_BSTR in which case the it must be the IID string in the form “{12345678-1234-1234-1234-123456789ABC}”. If VT_I4 or VT_UI4, then it must be a cookie from a previous call to either AttachNotifySink or McObjects.AttachNotifySinkToCategory. If VT_EMPTY, a NULL pointer or IID_IMcObjStandardNotify, the notify sink is to be a standard one.

varISinkIIDDRequired. A Variant value.
lNotifyCodeOptional. A Long value.

A value passed to the FireTo method.

Remarks

MOM_uGetNotifySinkIIDFromVariant is used to get the IID of the sink to call. Then for each Sink interface owner with that IID, the IUnknown* piunkSinkToCall is recovered and a call is made to IMcObjFireCustomSink.FireTo( piunkSinkToCall, DWORD(hObj), hObj->GetOwningIMcObject(), lNotifyCode).

If the FireTo call returns S_FALSE, then the notify loop is aborted (that is, no other attached sinks are notified).

Attached owner sinks are notified in the order they were attached unless McObjects.SetNotifyOrder has been called.

There is less overhead calling FireStandardNotifyToAllSinks than using this method, if the IMcObjStandardNotify will work for you.

See AttachNotifySink for an explaination of notify-related issues.