summaryrefslogtreecommitdiff
path: root/ext/dotnet
diff options
context:
space:
mode:
authorHarald Radi <phanto@php.net>2001-01-28 03:41:43 +0000
committerHarald Radi <phanto@php.net>2001-01-28 03:41:43 +0000
commit7478783b208a72843d747549422e8544f2f1175a (patch)
treedd756cf09914d00e48fcafef0f3e553dcf30e12e /ext/dotnet
parentdac7ab13da334669403076c423ffceae37b15cee (diff)
downloadphp-git-7478783b208a72843d747549422e8544f2f1175a.tar.gz
fixed unicodeconversion and parameter passing bugs in com and dotnet modules
Diffstat (limited to 'ext/dotnet')
-rw-r--r--ext/dotnet/dotnet.cpp38
1 files changed, 11 insertions, 27 deletions
diff --git a/ext/dotnet/dotnet.cpp b/ext/dotnet/dotnet.cpp
index 7cb14df86b..12326f1d5e 100644
--- a/ext/dotnet/dotnet.cpp
+++ b/ext/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