Lines Matching refs:obj
35 php_com_dotnet_object *obj; in com_property_read() local
44 obj = CDNO_FETCH(object); in com_property_read()
46 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_read()
51 res = php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), in com_property_read()
55 php_com_zval_from_variant(return_value, &v, obj->code_page TSRMLS_CC); in com_property_read()
69 php_com_dotnet_object *obj; in com_property_write() local
72 obj = CDNO_FETCH(object); in com_property_write()
74 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_write()
78 if (SUCCESS == php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), in com_property_write()
90 php_com_dotnet_object *obj; in com_read_dimension() local
98 obj = CDNO_FETCH(object); in com_read_dimension()
100 if (V_VT(&obj->v) == VT_DISPATCH) { in com_read_dimension()
103 if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_read_dimension()
105 php_com_zval_from_variant(return_value, &v, obj->code_page TSRMLS_CC); in com_read_dimension()
108 } else if (V_ISARRAY(&obj->v)) { in com_read_dimension()
111 if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) { in com_read_dimension()
112 if (php_com_safearray_get_elem(&obj->v, &v, Z_LVAL_P(offset) TSRMLS_CC)) { in com_read_dimension()
113 php_com_wrap_variant(return_value, &v, obj->code_page TSRMLS_CC); in com_read_dimension()
129 php_com_dotnet_object *obj; in com_write_dimension() local
134 obj = CDNO_FETCH(object); in com_write_dimension()
136 if (V_VT(&obj->v) == VT_DISPATCH) { in com_write_dimension()
142 if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_write_dimension()
146 } else if (V_ISARRAY(&obj->v)) { in com_write_dimension()
150 if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) { in com_write_dimension()
151 if (FAILED(SafeArrayGetVartype(V_ARRAY(&obj->v), &vt)) || vt == VT_EMPTY) { in com_write_dimension()
152 vt = V_VT(&obj->v) & ~VT_ARRAY; in com_write_dimension()
159 php_com_variant_from_zval(&v, value, obj->code_page TSRMLS_CC); in com_write_dimension()
166 res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v); in com_write_dimension()
168 res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v.lVal); in com_write_dimension()
202 php_com_dotnet_object *obj; in com_property_exists() local
204 obj = CDNO_FETCH(object); in com_property_exists()
206 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_exists()
208 …if (SUCCEEDED(php_com_get_id_of_name(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), &dispid TSRMLS_C… in com_property_exists()
265 php_com_dotnet_object *obj; in com_method_get() local
270 obj = CDNO_FETCH(object); in com_method_get()
272 if (V_VT(&obj->v) != VT_DISPATCH) { in com_method_get()
276 if (FAILED(php_com_get_id_of_name(obj, name, len, &dummy TSRMLS_CC))) { in com_method_get()
281 …if (obj->method_cache == NULL || FAILURE == zend_hash_find(obj->method_cache, name, len, (void**)&… in com_method_get()
285 f.scope = obj->ce; in com_method_get()
292 if (obj->typeinfo) { in com_method_get()
302 if (SUCCEEDED(ITypeInfo_GetTypeComp(obj->typeinfo, &comp))) { in com_method_get()
303 olename = php_com_string_to_olestring(name, len, obj->code_page TSRMLS_CC); in com_method_get()
346 if (!obj->method_cache) { in com_method_get()
347 ALLOC_HASHTABLE(obj->method_cache); in com_method_get()
348 zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0); in com_method_get()
351 zend_hash_update(obj->method_cache, name, len, &f, sizeof(f), (void**)&fptr); in com_method_get()
370 php_com_dotnet_object *obj; in com_call_method() local
375 obj = CDNO_FETCH(getThis()); in com_call_method()
377 if (V_VT(&obj->v) != VT_DISPATCH) { in com_call_method()
390 …if (SUCCESS == php_com_do_invoke_byref(obj, (char*)method, -1, DISPATCH_METHOD|DISPATCH_PROPERTYGE… in com_call_method()
391 php_com_zval_from_variant(return_value, &v, obj->code_page TSRMLS_CC); in com_call_method()
405 php_com_dotnet_object *obj; in com_constructor_get() local
408 obj = CDNO_FETCH(object); in com_constructor_get()
412 f.function_name = (char *) obj->ce->name; \ in com_constructor_get()
413 f.scope = obj->ce; \ in com_constructor_get()
420 switch (obj->ce->name[0]) { in com_constructor_get()
439 php_com_dotnet_object *obj; in com_class_entry_get() local
440 obj = CDNO_FETCH(object); in com_class_entry_get()
442 return obj->ce; in com_class_entry_get()
447 php_com_dotnet_object *obj; in com_class_name_get() local
448 obj = CDNO_FETCH(object); in com_class_name_get()
450 *class_name = estrndup(obj->ce->name, obj->ce->name_length); in com_class_name_get()
451 *class_name_len = obj->ce->name_length; in com_class_name_get()
491 php_com_dotnet_object *obj; in com_object_cast() local
496 obj = CDNO_FETCH(readobj); in com_object_cast()
500 if (V_VT(&obj->v) == VT_DISPATCH) { in com_object_cast()
501 if (SUCCESS != php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_object_cast()
503 VariantCopy(&v, &obj->v); in com_object_cast()
506 VariantCopy(&v, &obj->v); in com_object_cast()
531 php_com_zval_from_variant(writeobj, &v, obj->code_page TSRMLS_CC); in com_object_cast()
545 php_com_dotnet_object *obj; in com_object_count() local
548 obj = CDNO_FETCH(object); in com_object_count()
550 if (!V_ISARRAY(&obj->v)) { in com_object_count()
554 SafeArrayGetLBound(V_ARRAY(&obj->v), 1, &lbound); in com_object_count()
555 SafeArrayGetUBound(V_ARRAY(&obj->v), 1, &ubound); in com_object_count()
589 void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable TSRMLS_DC) in php_com_object_enable_event_sink() argument
591 if (obj->sink_dispatch) { in php_com_object_enable_event_sink()
595 if (SUCCEEDED(IDispatch_QueryInterface(V_DISPATCH(&obj->v), in php_com_object_enable_event_sink()
599 &obj->sink_id, &point))) { in php_com_object_enable_event_sink()
602 IConnectionPoint_Advise(point, (IUnknown*)obj->sink_dispatch, &obj->sink_cookie); in php_com_object_enable_event_sink()
604 IConnectionPoint_Unadvise(point, obj->sink_cookie); in php_com_object_enable_event_sink()
615 php_com_dotnet_object *obj = (php_com_dotnet_object*)object; in php_com_object_free_storage() local
617 if (obj->typeinfo) { in php_com_object_free_storage()
618 ITypeInfo_Release(obj->typeinfo); in php_com_object_free_storage()
619 obj->typeinfo = NULL; in php_com_object_free_storage()
622 if (obj->sink_dispatch) { in php_com_object_free_storage()
623 php_com_object_enable_event_sink(obj, FALSE TSRMLS_CC); in php_com_object_free_storage()
624 IDispatch_Release(obj->sink_dispatch); in php_com_object_free_storage()
625 obj->sink_dispatch = NULL; in php_com_object_free_storage()
628 VariantClear(&obj->v); in php_com_object_free_storage()
630 if (obj->method_cache) { in php_com_object_free_storage()
631 zend_hash_destroy(obj->method_cache); in php_com_object_free_storage()
632 FREE_HASHTABLE(obj->method_cache); in php_com_object_free_storage()
634 if (obj->id_of_name_cache) { in php_com_object_free_storage()
635 zend_hash_destroy(obj->id_of_name_cache); in php_com_object_free_storage()
636 FREE_HASHTABLE(obj->id_of_name_cache); in php_com_object_free_storage()
638 efree(obj); in php_com_object_free_storage()
667 php_com_dotnet_object *obj; in php_com_object_new() local
671 obj = emalloc(sizeof(*obj)); in php_com_object_new()
672 memset(obj, 0, sizeof(*obj)); in php_com_object_new()
674 VariantInit(&obj->v); in php_com_object_new()
675 obj->code_page = CP_ACP; in php_com_object_new()
676 obj->ce = ce; in php_com_object_new()
677 obj->zo.ce = ce; in php_com_object_new()
679 …retval.handle = zend_objects_store_put(obj, NULL, php_com_object_free_storage, php_com_object_clon… in php_com_object_new()