Commit Graph

13 Commits

Author SHA1 Message Date
Wez Furlong
e04d6ca9f7 - Make sure that COM and VARIANT resources are returned as resources
rather than longs.
- Make the IDispatch implementation a bit more generic (and
  fix my mess of pointers).
- Add new com_message_pump() function that acts like an interruptible
  usleep() that processes COM calls/events.
- Add new com_print_typeinfo() function for "decompiling" the typeinfo
  for an interface into PHP script.  This is useful for generating a
  skeleton for use as an event sink.
- Add new com_event_sink() function for sinking events from COM
  objects.  Usage is like this:

<?php

class IEEventSinker {
	var $terminated = false;

	function ProgressChange($progress, $progressmax) {
		echo "Download progress: $progress / $progressmax\n";
	}
	function DocumentComplete(&$dom, $url) {
		echo "Document $url complete\n";
	}
	function OnQuit() {
		echo "Quit!\n";
		$this->terminated = true;
	}
}

$ie = new COM("InternetExplorer.Application");

$sink =& new IEEventSinker();
com_event_sink($ie, $sink, "DWebBrowserEvents2");

$ie->Visible = true;
$ie->Navigate("http://www.php.net");

while(!$sink->terminated) {
	com_message_pump(4000);
}
$ie = null;
?>
2002-05-21 18:58:11 +00:00
Harald Radi
e47a667cc9 integrating wez's patch 2002-05-20 15:35:57 +00:00
Harald Radi
51241dba94 this patch should fix a bug where intermediate comvals were not
released before they were freed. this caused outproc com server
to belive that they still referenced even when the php process
already terminated.
2002-04-26 18:20:45 +00:00
Harald Radi
9c6b9eb76b merged from EXPERIMENTAL
lots of cleanup work
2001-08-13 23:39:11 +00:00
Andi Gutmans
ff39e51fdf - Make com work with new object model 2001-08-12 04:31:14 +00:00
Andi Gutmans
5c5178b2f4 - More object macros 2001-07-28 19:23:21 +00:00
Harald Radi
22d42820b7 cast error 2001-06-24 21:19:49 +00:00
Harald Radi
3949658942 cleanup
added some macros
2001-06-24 21:09:17 +00:00
Harald Radi
20bb78f397 added experimental enum support
changed everthing to use the Z_* makros
2001-06-11 23:05:32 +00:00
Harald Radi
c9159797d8 removed unneeded function 2001-06-03 01:38:56 +00:00
Harald Radi
49be36d70d modified because of the changes in com.c 2001-05-13 14:22:19 +00:00
Harald Radi
8dc2dbaf9b removed itypeinfo calls because they didn't work on every machine
#i'm investigating this ...
2001-05-02 21:51:19 +00:00
Harald Radi
256d799809 @Using ITypeInfo instead of IDispatch if possible. This makes DCOM calls
@and even COM calls much faster.
@All ini settings are now prefixed by 'com.'.
@Now you need not provide a path to the file containing the typelib, you can
@also provide the GUID of the TypeLib - entry or an IID for preloading
@type - information. (phanto)
memory leak was reportet, i'm not sure that it is fixed by now, but it should be.
2001-03-20 22:35:30 +00:00