Click to return to the Reusing Browser Technology home page    
IElementBehaviorSiteOM::C...     IElementBehaviorSiteOM::G...     IElementBehaviorSiteOM In...    
Web Workshop  |  Reusing Browser Technology

IElementBehaviorSiteOM::FireEvent Method


Fires a custom event.

Syntax

HRESULT FireEvent(
    LONG  lEventCookie,
    IHTMLEventObj *pEventObject
);

Parameters

lEventCookie
[in] Long variable that identifies the custom event.
pEventObject
[in] Address of the IHTMLEventObj interface of the event object to be fired.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

A DHTML behavior uses this method to fire a custom event, pass additional information, and check for any return values. The DHTML behavior retrieves return values from the event object by calling the IHTMLEventObj::get_returnValue method or the IHTMLEventObj2::getAttribute method, or by querying the event object for the IDispatchEx interface.

A custom event must be registered through a call to the IElementBehaviorSiteOM::RegisterEvent method.

The DHTML behavior must release the event object once the object is no longer required.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.