GetEventCookie method

Gets the value that identifies a custom event.

Syntax

HRESULT retVal = object.GetEventCookie(pchEvent, plCookie);

Parameters

  • pchEvent [in]
    Type: LPOLESTR

    A pointer to a string that specifies the name of the event.

  • plCookie [out, retval]
    Type: LONG

    A pointer to a variable of type LONG that identifies the custom event specified by pchEvent.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

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