Platform SDK: Broadcast Architecture

IATVEFSend::SendTrigger

Formats an ATVEF-compliant trigger based on the specified text parameter values, and then sends it.

HRESULT SendTrigger(
  LPOLESTR szURL,
  LPOLESTR szName,
  LPOLESTR szScript
);

Parameters

szURL
URL of the file to be triggered in either absolute or "lid://" format.
szName
Human-readable text description of the trigger.
szScript
Script fragment to execute in the context of the HTML page currently being displayed.

Return Value

Returns S_OK if the method succeeds; otherwise, an error code is returned. This method will return S_FAIL if the trigger connection is closed.

Remarks

A trigger cannot be longer than 1472 bytes. The SendTrigger method enforces this limitation.

The name parameter may consist of any characters between ASCII 0x20 and 0x7e except square brackets or angle brackets. If this value is set to NULL or the string has zero length, the [name:] attribute identifier will not be added to the trigger.

A script fragment may be a native ECMAScript command such as: frame1.src"http://atv.com/f1" or an invocation of a user-defined function on the current HTML page, such as ShowMyName("myString"). If this value is set to NULL or the string has zero length, the [script:] attribute identifier will not be added to the trigger.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 98.
  Header: Declared in atvefsnd.idl.
  Import Library: Included as a resource in atvefsnd.dll.

See Also

Sending Announcements, Triggers, and Packages, IATVEFSend::Connect