diff options
author | Wez Furlong <wez@php.net> | 2004-01-07 21:00:07 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2004-01-07 21:00:07 +0000 |
commit | e10c206dac0fbd43e20f9ae9b704e76c5c564d2f (patch) | |
tree | 9675f1c8d2760ce9e7d3f6bf766d5ad434dc96c0 /ext/com_dotnet/com_dotnet.c | |
parent | 48b96c10d2c9efbe4ff11876c6cd9f9361073bc3 (diff) | |
download | php-git-e10c206dac0fbd43e20f9ae9b704e76c5c564d2f.tar.gz |
Port other major parts of PHP 4 COM extension into PHP 5 com_dotnet
extension.
This enables:
- iteration of SafeArray types via foreach()
- proxying of multi-dimensional SafeArray types so that multi-dimension
array accesses work (untested!)
- Fix COM exceptions, and expose them as their own class of exception
"com_exception"
- auto typelib file import (com.typelib_file ini option)
- event sinking
- wrapper to map PHP objects to COM
- fix mapping of variant values to PHP values
# Could someone please add com_saproxy.c and com_wrapper.c to the .dsp
# file?
Diffstat (limited to 'ext/com_dotnet/com_dotnet.c')
-rw-r--r-- | ext/com_dotnet/com_dotnet.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index 9b39b678e4..481fdaa815 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 4 | + | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2003 The PHP Group | +----------------------------------------------------------------------+ @@ -109,7 +109,7 @@ PHP_FUNCTION(com_dotnet_create_instance) if (COMG(dotnet_runtime_stuff) == NULL) { if (FAILURE == dotnet_init(TSRMLS_C)) { - php_com_throw_exception("Failed to initialize .Net runtime" TSRMLS_CC); + php_com_throw_exception(E_ERROR, "Failed to initialize .Net runtime" TSRMLS_CC); ZVAL_NULL(object); return; } @@ -123,7 +123,7 @@ PHP_FUNCTION(com_dotnet_create_instance) &assembly_name, &assembly_name_len, &datatype_name, &datatype_name_len, &obj->code_page)) { - php_com_throw_exception("Could not create .Net object - invalid arguments!" TSRMLS_CC); + php_com_throw_exception(E_INVALIDARG, "Could not create .Net object - invalid arguments!" TSRMLS_CC); ZVAL_NULL(object); return; } @@ -171,7 +171,7 @@ PHP_FUNCTION(com_dotnet_create_instance) VariantClear(&vargs[1]); if (ret == FAILURE) { - php_com_throw_exception("Failed to instantiate .Net object" TSRMLS_CC); + php_com_throw_exception(hr, "Failed to instantiate .Net object" TSRMLS_CC); ZVAL_NULL(object); return; } |