diff options
Diffstat (limited to 'ext/rpc/dotnet/dotnet.cpp')
-rw-r--r-- | ext/rpc/dotnet/dotnet.cpp | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/ext/rpc/dotnet/dotnet.cpp b/ext/rpc/dotnet/dotnet.cpp index 7cb14df86b..12326f1d5e 100644 --- a/ext/rpc/dotnet/dotnet.cpp +++ b/ext/rpc/dotnet/dotnet.cpp @@ -21,6 +21,13 @@ * This module implements support for Microsoft .Net components. */ +/* + * 28.1.2001 + * use external unicode conversion functions + * + * harald radi <h.radi@nme.at> + */ + #ifdef PHP_WIN32 #include <iostream.h> @@ -31,21 +38,16 @@ extern "C" { #include "php.h" #include "php_ini.h" -pval php_COM_get_property_handler(zend_property_reference *property_reference); - +OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen); +} +pval php_COM_get_property_handler(zend_property_reference *property_reference); int php_COM_set_property_handler(zend_property_reference *property_reference, pval *value); - char *php_COM_error_message(HRESULT hr); - void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference); - int php_COM_get_le_idispatch(); -} - - -#include <stdio.h> +#include "../com/conversion.h" #include "Mscoree.h" #include "mscorlib.h" @@ -56,19 +58,6 @@ static mscorlib::_AppDomain *pDomain; static zend_class_entry dotnet_class_entry; -static OLECHAR *php_char_to_OLECHAR(char *C_str, uint strlen) -{ - OLECHAR *unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR)*(strlen+1)); - OLECHAR *unicode_ptr = unicode_str; - - while (*C_str) { - *unicode_ptr++ = (unsigned short) *C_str++; - } - *unicode_ptr = 0; - - return unicode_str; -} - HRESULT dotnet_init() { HRESULT hr; @@ -156,7 +145,6 @@ PHP_FUNCTION(DOTNET_load) /* }}} */ - void php_DOTNET_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference) { pval *object = property_reference->object; @@ -182,7 +170,6 @@ void php_DOTNET_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_propert } } - void php_register_DOTNET_class() { INIT_OVERLOADED_CLASS_ENTRY(dotnet_class_entry, "DOTNET", NULL, @@ -237,7 +224,4 @@ extern "C" { ZEND_GET_MODULE(dotnet) } -void php_register_DOTNET_class(); - - #endif |