Binds the specified function to an event, so that the function is called whenever the event fires on the object.
HRESULT attachEvent( BSTR event, IDispatch *pDisp, VARIANT_BOOL *pfResult );
- [in] BSTR that specifies any of the MSHTML Event DispInterfaces.
- [in] Pointer to an IDispatch interface that specifies an object to be called whenever event fires.
- [out, retval] Pointer to a VARIANT_BOOL that receives one of the following values:
- Function did bind successfully to the event
- Function did not bind successfully to the event.
Returns S_OK if successful, or an error value otherwise.