Lines Matching refs:obj
32 php_com_dotnet_object *obj; in com_property_read() local
38 obj = CDNO_FETCH(object); in com_property_read()
40 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_read()
47 res = php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), in com_property_read()
51 php_com_zval_from_variant(rv, &v, obj->code_page); in com_property_read()
65 php_com_dotnet_object *obj; in com_property_write() local
68 obj = CDNO_FETCH(object); in com_property_write()
70 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_write()
77 if (SUCCESS == php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), in com_property_write()
89 php_com_dotnet_object *obj; in com_read_dimension() local
94 obj = CDNO_FETCH(object); in com_read_dimension()
96 if (V_VT(&obj->v) == VT_DISPATCH) { in com_read_dimension()
99 if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_read_dimension()
101 php_com_zval_from_variant(rv, &v, obj->code_page); in com_read_dimension()
104 } else if (V_ISARRAY(&obj->v)) { in com_read_dimension()
107 if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) { in com_read_dimension()
108 if (php_com_safearray_get_elem(&obj->v, &v, (LONG)Z_LVAL_P(offset))) { in com_read_dimension()
109 php_com_wrap_variant(rv, &v, obj->code_page); in com_read_dimension()
125 php_com_dotnet_object *obj; in com_write_dimension() local
130 obj = CDNO_FETCH(object); in com_write_dimension()
137 if (V_VT(&obj->v) == VT_DISPATCH) { in com_write_dimension()
143 if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_write_dimension()
147 } else if (V_ISARRAY(&obj->v)) { in com_write_dimension()
151 if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) { in com_write_dimension()
152 if (FAILED(SafeArrayGetVartype(V_ARRAY(&obj->v), &vt)) || vt == VT_EMPTY) { in com_write_dimension()
153 vt = V_VT(&obj->v) & ~VT_ARRAY; in com_write_dimension()
160 php_com_variant_from_zval(&v, value, obj->code_page); in com_write_dimension()
167 res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v); in com_write_dimension()
169 res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v.lVal); in com_write_dimension()
208 php_com_dotnet_object *obj; in com_property_exists() local
210 obj = CDNO_FETCH(object); in com_property_exists()
212 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_exists()
216 if (SUCCEEDED(php_com_get_id_of_name(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), &dispid))) { in com_property_exists()
286 php_com_dotnet_object *obj = (php_com_dotnet_object*)*object_ptr; in com_method_get() local
288 if (V_VT(&obj->v) != VT_DISPATCH) { in com_method_get()
292 if (FAILED(php_com_get_id_of_name(obj, name->val, name->len, &dummy))) { in com_method_get()
297 if (obj->method_cache == NULL || NULL == (fptr = zend_hash_find_ptr(obj->method_cache, name))) { in com_method_get()
301 f.scope = obj->ce; in com_method_get()
308 if (obj->typeinfo) { in com_method_get()
318 if (SUCCEEDED(ITypeInfo_GetTypeComp(obj->typeinfo, &comp))) { in com_method_get()
319 olename = php_com_string_to_olestring(name->val, name->len, obj->code_page); in com_method_get()
362 if (!obj->method_cache) { in com_method_get()
363 ALLOC_HASHTABLE(obj->method_cache); in com_method_get()
364 zend_hash_init(obj->method_cache, 2, NULL, function_dtor, 0); in com_method_get()
367 zend_hash_update_mem(obj->method_cache, name, &f, sizeof(f)); in com_method_get()
385 php_com_dotnet_object *obj = (php_com_dotnet_object*)object; in com_call_method() local
390 if (V_VT(&obj->v) != VT_DISPATCH) { in com_call_method()
403 …if (SUCCESS == php_com_do_invoke_byref(obj, (zend_internal_function*)EX(func), DISPATCH_METHOD|DIS… in com_call_method()
404 php_com_zval_from_variant(return_value, &v, obj->code_page); in com_call_method()
418 php_com_dotnet_object *obj = (php_com_dotnet_object *) object; in com_constructor_get() local
423 f.function_name = obj->ce->name; \ in com_constructor_get()
424 f.scope = obj->ce; \ in com_constructor_get()
431 switch (obj->ce->name->val[0]) { in com_constructor_get()
450 php_com_dotnet_object *obj = (php_com_dotnet_object *)object; in com_class_name_get() local
452 return zend_string_copy(obj->ce->name); in com_class_name_get()
490 php_com_dotnet_object *obj; in com_object_cast() local
495 obj = CDNO_FETCH(readobj); in com_object_cast()
499 if (V_VT(&obj->v) == VT_DISPATCH) { in com_object_cast()
500 if (SUCCESS != php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_object_cast()
502 VariantCopy(&v, &obj->v); in com_object_cast()
505 VariantCopy(&v, &obj->v); in com_object_cast()
533 php_com_zval_from_variant(writeobj, &v, obj->code_page); in com_object_cast()
547 php_com_dotnet_object *obj; in com_object_count() local
550 obj = CDNO_FETCH(object); in com_object_count()
552 if (!V_ISARRAY(&obj->v)) { in com_object_count()
556 SafeArrayGetLBound(V_ARRAY(&obj->v), 1, &lbound); in com_object_count()
557 SafeArrayGetUBound(V_ARRAY(&obj->v), 1, &ubound); in com_object_count()
593 void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable) in php_com_object_enable_event_sink() argument
595 if (obj->sink_dispatch) { in php_com_object_enable_event_sink()
599 if (SUCCEEDED(IDispatch_QueryInterface(V_DISPATCH(&obj->v), in php_com_object_enable_event_sink()
603 &obj->sink_id, &point))) { in php_com_object_enable_event_sink()
606 IConnectionPoint_Advise(point, (IUnknown*)obj->sink_dispatch, &obj->sink_cookie); in php_com_object_enable_event_sink()
608 IConnectionPoint_Unadvise(point, obj->sink_cookie); in php_com_object_enable_event_sink()
619 php_com_dotnet_object *obj = (php_com_dotnet_object*)object; in php_com_object_free_storage() local
621 if (obj->typeinfo) { in php_com_object_free_storage()
622 ITypeInfo_Release(obj->typeinfo); in php_com_object_free_storage()
623 obj->typeinfo = NULL; in php_com_object_free_storage()
626 if (obj->sink_dispatch) { in php_com_object_free_storage()
627 php_com_object_enable_event_sink(obj, FALSE); in php_com_object_free_storage()
628 IDispatch_Release(obj->sink_dispatch); in php_com_object_free_storage()
629 obj->sink_dispatch = NULL; in php_com_object_free_storage()
632 VariantClear(&obj->v); in php_com_object_free_storage()
634 if (obj->method_cache) { in php_com_object_free_storage()
635 zend_hash_destroy(obj->method_cache); in php_com_object_free_storage()
636 FREE_HASHTABLE(obj->method_cache); in php_com_object_free_storage()
638 if (obj->id_of_name_cache) { in php_com_object_free_storage()
639 zend_hash_destroy(obj->id_of_name_cache); in php_com_object_free_storage()
640 FREE_HASHTABLE(obj->id_of_name_cache); in php_com_object_free_storage()
672 php_com_dotnet_object *obj; in php_com_object_new() local
675 obj = emalloc(sizeof(*obj)); in php_com_object_new()
676 memset(obj, 0, sizeof(*obj)); in php_com_object_new()
678 VariantInit(&obj->v); in php_com_object_new()
679 obj->code_page = CP_ACP; in php_com_object_new()
680 obj->ce = ce; in php_com_object_new()
682 zend_object_std_init(&obj->zo, ce); in php_com_object_new()
683 obj->zo.handlers = &php_com_object_handlers; in php_com_object_new()
685 obj->typeinfo = NULL; in php_com_object_new()
687 return (zend_object*)obj; in php_com_object_new()