Home > PHP > Function > COM > com_event_sink()

com_event_sink()

com_event_sink - Connect events from a COM object to a PHP object

Syntax

bool com_event_sink (variant $comobject, object $sinkobject, mixed $sinkinterface)

Arguments

  • comobject
  • sinkobject - sinkobject should be an instance of a class with methods named after those of the desired dispinterface; you may use com_print_typeinfo() to help generate a template class for this purpose.
  • sinkinterface - PHP will attempt to use the default dispinterface type specified by the typelibrary associated with comobject, but you may override this choice by setting sinkinterface to the name of the dispinterface that you want to use.

Description

Instructs COM to sink events generated by comobject into the PHP object sinkobject.

Version

PHP 4.2.0, 5

Return value

Returns TRUE on success or FALSE on failure.