DetachEvent

Functions that were bound to an event using the AttachEvent method must be unbound from the event, to stop receiving notifications when the event occurs.

 

JavaScript

 

DetachEvent(

       bstrEventName,

       dispFunc)

 

C#

 

void DetachEvent(

       string bstrEventName,

       object dispFunc)

 

C++

 

HRESULT DetachEvent(

       BSTR bstrEventName,

       VARIANT dispFunc)

 

Parameters

bstrEventName

A string representing the event name.

dispFunc

The function that was attached to the event.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.