Commit Graph

214 Commits

Author SHA1 Message Date
Harald Radi
f629da9384 MFB ext/com
fix #22899
invoke is called twice
2003-03-27 19:56:59 +00:00
Sebastian Bergmann
3fc852824f Eliminate TSRMLS_FETCH() calls in destroy_op_array() and zend_get_class_entry(). 2003-03-26 07:44:11 +00:00
Wez Furlong
6fed2e95b2 Fix build for activescript sapi 2003-03-02 13:09:48 +00:00
Wez Furlong
4c4d77d23e Fix incorrect TSRMLS_CC usage.
Fix com_create_guid()
2003-02-18 19:03:44 +00:00
Wez Furlong
aad491817c Implement com_create_guid().
Add a special case for RETVAL_VARIANT when a variant is of type VT_DISPATCH but has a NULL dispatch pointer.
This kind of variant is returned by the WindowsInstaller automation interface.
2003-02-18 09:46:19 +00:00
Wez Furlong
2003d8eeb6 Implement com_indexed_prop_set() which allows setting of array-like indexed properties on COM objects.
It is expected that this function will be transient, waiting for engine-level and then rpc-level support to be implemented so that this can be integrated more completely.
I'm committing this now so that others can help develop the msi installer scripts that require this feature.
2003-02-18 07:36:31 +00:00
Zeev Suraski
4934744b93 Win32 build improvements 2003-02-17 13:29:59 +00:00
Wez Furlong
0a18a9d744 A add much more useful select(2) implementation than is provided by
windows sockets.  The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.

This change required linking against the winsock2 library.  In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default.  It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.

Also, add a win32 compatible pipe test when opening a stream from a pipe.  This test will only work on NT, win2k and XP platforms.  Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered.  I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
Ilia Alshanetsky
55840914cb Fixed warnings. 2003-02-13 17:39:18 +00:00
Ilia Alshanetsky
f9457bf842 Added missing header needed for rpc_error(). 2003-02-13 14:54:43 +00:00
Harald Radi
be950d9c51 improved reverse lookup of ProgID based on an IDispatch pointer 2003-02-11 00:54:27 +00:00
Wez Furlong
0c70df4907 fix rpc_error call 2003-02-10 23:22:49 +00:00
Harald Radi
5066caef31 a bunch of fixes 2003-02-10 20:59:11 +00:00
Wez Furlong
0ff83111c7 byref really means that we want the zval... 2003-02-10 20:30:24 +00:00
Wez Furlong
447976d8ee Implement com_describe 2003-02-10 18:37:28 +00:00
Wez Furlong
35639435c9 Error reporting clean up 2003-02-10 13:13:28 +00:00
Wez Furlong
b0894e7eba Error reporting leaks and cleanup 2003-02-10 12:33:15 +00:00
Wez Furlong
03e22793ff Fix various little leaks and segfaults.
Fix scripts like this:
$obj = new COM('Foo');
$obj2 = $obj->get_object();
$obj2->method();  // <-- would segfault here
2003-02-09 21:40:13 +00:00
Ilia Alshanetsky
2500199ae3 ZTS fixes. 2003-01-19 04:09:32 +00:00
Ilia Alshanetsky
3d8e54f3a2 Changed php_error to php_error_docref. 2003-01-19 00:45:53 +00:00
Harald Radi
5aae306f96 for those who prefer to have com as a shared lib 2003-01-16 18:15:44 +00:00
Harald Radi
7f127a22df make layers loadable as self-sustaining php extension
which registeres itself in the rpc framework.
2003-01-16 17:49:22 +00:00
Frank M. Kromann
d07dc0fc4c false should be VT_FALSE 2003-01-13 19:33:10 +00:00
Harald Radi
656ccddfce fix build 2003-01-11 08:59:37 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Derick Rethans
a88e5c6e8d - Remove \n from error messages 2002-11-10 21:24:54 +00:00
Harald Radi
cbe4f69663 - added a skeleton for new layers
- a bit cleanup
2002-07-19 16:19:00 +00:00
Harald Radi
c83f78dc96 ext/rpc/com should work now, but there's still lots of work left. 2002-07-18 18:31:37 +00:00
Harald Radi
77f1d265be merging parts of the old com extension to the new rpc extension 2002-07-10 20:27:17 +00:00
Harald Radi
d90ca98223 add file again that andrei deleted by
accident (i don't want to blame anyone here)
2002-07-09 20:32:05 +00:00
Harald Radi
30e1541595 reflect the new abstraction changes in the demo layer 2002-06-09 14:52:50 +00:00
Harald Radi
d1b01b92ab added wez and ordered names alphabetically 2002-05-31 09:43:22 +00:00
Harald Radi
acc1021f0d #forgot something 2002-05-30 23:17:48 +00:00
Harald Radi
d3ca5abab7 @ Added missing AddRef() calls in the COM extension. This should
@ fix weird behaviour (in particular with ADODB). (Harald)

# waah, this suxx
2002-05-30 23:07:23 +00:00
Wez Furlong
762effcf60 Add documentation comment for properties in com_print_typeinfo 2002-05-21 22:44:10 +00:00
Wez Furlong
fbf920d9a3 Enhance com_print_typeinfo.
The main expected use is like this, for figuring out what methods
are allowed for a COM object:

$ie = new COM("InternetExplorer.Application");
// Prints class definition for IE object
com_print_typeinfo($ie, "InternetExplorer.Application", false);
// Prints class definition for default IE event handler
com_print_typeinfo($ie, "InternetExplorer.Application", true);
2002-05-21 22:41:45 +00:00
Wez Furlong
8a53a89a94 Correct usage of convert_to_string_ex which is not allowed to zval* 2002-05-21 20:57:04 +00:00
Wez Furlong
c05834fbce Reformat some comments. 2002-05-21 20:51:31 +00:00
Wez Furlong
e2b9f0d964 Fix a flag, remove an old comment. 2002-05-21 20:46:08 +00:00
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
Wez Furlong
fc964e88d3 Added generic COM wrapper for PHP objects. 2002-05-20 01:31:48 +00:00
Harald Radi
37b9089bfa this should finally fix bug #14353 2002-05-15 17:59:48 +00:00
Harald Radi
fe84a29b3f remove temporary resources immediately
return value fix

#thanks to alan for 'remote debugging'
2002-05-02 13:37:31 +00:00
Harald Radi
e72caee650 RETURN_NULL() is defined with braces while RETURN_TRUE
and RETURN_FALSE are defined without.
seems not very consistent ?
2002-04-29 17:20:15 +00:00
Harald Radi
667a0841f3 functions returned FALSE in case of error and the oo api returned NULL.
make them both behave equal (return NULL, as FALSE can be a valid value).
2002-04-29 15:50:30 +00:00
Harald Radi
da9dd9acc9 updated TODO list 2002-04-27 15:47:18 +00:00
Harald Radi
a380af2247 don't set CLSCTX_REMOTE_SERVER if NULL is passed as servername 2002-04-27 10:17:46 +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
Derick Rethans
4ec1a03653 - Fix for bug #14353 2002-04-25 06:37:22 +00:00