if (FAILED(hr)) {
switch (hr) {
case DISP_E_EXCEPTION: {
+
char *src=estrdup("Unavailable");
int srclen=strlen(src);
char *desc=estrdup("Unavailable");
}
if (server_name != NULL) {
- /* if a server is passed, one obviously wants to instanciate a
- * remote server
- */
- flags = CLSCTX_REMOTE_SERVER;
-
/* What is server name? A String or an array? */
- if (Z_TYPE_P(server_name) == IS_ARRAY) {
+ if (Z_TYPE_P(server_name) == IS_NULL) {
+ server_name = NULL;
+ } else if (Z_TYPE_P(server_name) == IS_ARRAY) {
pval **tmp;
/* DAB: 22 Sept 2001 */
/* Aha - we have a number of possible */
convert_to_long_ex(tmp);
flags = (CLSCTX) Z_LVAL_PP(tmp);
}
- }
- if (Z_TYPE_P(server_name) == IS_NULL) {
- server_name = NULL;
} else {
if (!INI_INT("com.allow_dcom")) {
php_error(E_WARNING, "DCOM is disabled");
RETURN_FALSE;
} else {
+ flags = CLSCTX_REMOTE_SERVER;
convert_to_string_ex(&server_name);
}
}
ALLOC_HASHTABLE(properties); \
zend_hash_init(properties, 0, NULL, ZVAL_PTR_DTOR, 0); \
\
- ALLOC_ZVAL(handle); \
- INIT_PZVAL(handle); \
+ MAKE_STD_ZVAL(handle); \
ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \
\
zval_copy_ctor(handle); \
#define ALLOC_COM(z) (z) = (comval *) emalloc(sizeof(comval)); \
C_REFCOUNT(z) = 0;
-#define FREE_COM(z) efree(z);
+#define FREE_COM(z) php_COM_destruct(z TSRMLS_CC);
#define IS_COM php_COM_get_le_comval()
if (FAILED(hr)) {
switch (hr) {
case DISP_E_EXCEPTION: {
+
char *src=estrdup("Unavailable");
int srclen=strlen(src);
char *desc=estrdup("Unavailable");
}
if (server_name != NULL) {
- /* if a server is passed, one obviously wants to instanciate a
- * remote server
- */
- flags = CLSCTX_REMOTE_SERVER;
-
/* What is server name? A String or an array? */
- if (Z_TYPE_P(server_name) == IS_ARRAY) {
+ if (Z_TYPE_P(server_name) == IS_NULL) {
+ server_name = NULL;
+ } else if (Z_TYPE_P(server_name) == IS_ARRAY) {
pval **tmp;
/* DAB: 22 Sept 2001 */
/* Aha - we have a number of possible */
convert_to_long_ex(tmp);
flags = (CLSCTX) Z_LVAL_PP(tmp);
}
- }
- if (Z_TYPE_P(server_name) == IS_NULL) {
- server_name = NULL;
} else {
if (!INI_INT("com.allow_dcom")) {
php_error(E_WARNING, "DCOM is disabled");
RETURN_FALSE;
} else {
+ flags = CLSCTX_REMOTE_SERVER;
convert_to_string_ex(&server_name);
}
}
ALLOC_HASHTABLE(properties); \
zend_hash_init(properties, 0, NULL, ZVAL_PTR_DTOR, 0); \
\
- ALLOC_ZVAL(handle); \
- INIT_PZVAL(handle); \
+ MAKE_STD_ZVAL(handle); \
ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \
\
zval_copy_ctor(handle); \
#define ALLOC_COM(z) (z) = (comval *) emalloc(sizeof(comval)); \
C_REFCOUNT(z) = 0;
-#define FREE_COM(z) efree(z);
+#define FREE_COM(z) php_COM_destruct(z TSRMLS_CC);
#define IS_COM php_COM_get_le_comval()