Lines Matching refs:obj

36 	php_com_dotnet_object *obj;  in com_property_read()  local
42 obj = CDNO_FETCH(object); in com_property_read()
44 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_read()
49 res = php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), in com_property_read()
53 php_com_zval_from_variant(rv, &v, obj->code_page); in com_property_read()
67 php_com_dotnet_object *obj; in com_property_write() local
70 obj = CDNO_FETCH(object); in com_property_write()
72 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_write()
76 if (SUCCESS == php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), in com_property_write()
87 php_com_dotnet_object *obj; in com_read_dimension() local
92 obj = CDNO_FETCH(object); in com_read_dimension()
94 if (V_VT(&obj->v) == VT_DISPATCH) { in com_read_dimension()
97 if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_read_dimension()
99 php_com_zval_from_variant(rv, &v, obj->code_page); in com_read_dimension()
102 } else if (V_ISARRAY(&obj->v)) { in com_read_dimension()
105 if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) { in com_read_dimension()
106 if (php_com_safearray_get_elem(&obj->v, &v, (LONG)Z_LVAL_P(offset))) { in com_read_dimension()
107 php_com_wrap_variant(rv, &v, obj->code_page); in com_read_dimension()
123 php_com_dotnet_object *obj; in com_write_dimension() local
128 obj = CDNO_FETCH(object); in com_write_dimension()
135 if (V_VT(&obj->v) == VT_DISPATCH) { in com_write_dimension()
141 if (SUCCESS == php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_write_dimension()
145 } else if (V_ISARRAY(&obj->v)) { in com_write_dimension()
149 if (SafeArrayGetDim(V_ARRAY(&obj->v)) == 1) { in com_write_dimension()
150 if (FAILED(SafeArrayGetVartype(V_ARRAY(&obj->v), &vt)) || vt == VT_EMPTY) { in com_write_dimension()
151 vt = V_VT(&obj->v) & ~VT_ARRAY; in com_write_dimension()
158 php_com_variant_from_zval(&v, value, obj->code_page); in com_write_dimension()
165 res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v); in com_write_dimension()
167 res = SafeArrayPutElement(V_ARRAY(&obj->v), &indices, &v.lVal); in com_write_dimension()
201 php_com_dotnet_object *obj; in com_property_exists() local
203 obj = CDNO_FETCH(object); in com_property_exists()
205 if (V_VT(&obj->v) == VT_DISPATCH) { in com_property_exists()
207 if (SUCCEEDED(php_com_get_id_of_name(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), &dispid))) { in com_property_exists()
270 php_com_dotnet_object *obj = (php_com_dotnet_object*)*object_ptr; in com_method_get() local
272 if (V_VT(&obj->v) != VT_DISPATCH) { in com_method_get()
276 if (FAILED(php_com_get_id_of_name(obj, name->val, name->len, &dummy))) { in com_method_get()
281 if (obj->method_cache == NULL || NULL == (fptr = zend_hash_find_ptr(obj->method_cache, name))) { 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->val, name->len, obj->code_page); 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_mem(obj->method_cache, name, &f, sizeof(f)); in com_method_get()
369 php_com_dotnet_object *obj = (php_com_dotnet_object*)object; in com_call_method() local
374 if (V_VT(&obj->v) != VT_DISPATCH) { in com_call_method()
387 …if (SUCCESS == php_com_do_invoke_byref(obj, (zend_internal_function*)EX(func), DISPATCH_METHOD|DIS… in com_call_method()
388 php_com_zval_from_variant(return_value, &v, obj->code_page); in com_call_method()
402 php_com_dotnet_object *obj = (php_com_dotnet_object *) object; in com_constructor_get() local
407 f.function_name = obj->ce->name; \ in com_constructor_get()
408 f.scope = obj->ce; \ in com_constructor_get()
415 switch (obj->ce->name->val[0]) { in com_constructor_get()
434 php_com_dotnet_object *obj = (php_com_dotnet_object *)object; in com_class_name_get() local
436 return zend_string_copy(obj->ce->name); in com_class_name_get()
474 php_com_dotnet_object *obj; in com_object_cast() local
479 obj = CDNO_FETCH(readobj); in com_object_cast()
483 if (V_VT(&obj->v) == VT_DISPATCH) { in com_object_cast()
484 if (SUCCESS != php_com_do_invoke_by_id(obj, DISPID_VALUE, in com_object_cast()
486 VariantCopy(&v, &obj->v); in com_object_cast()
489 VariantCopy(&v, &obj->v); in com_object_cast()
516 php_com_zval_from_variant(writeobj, &v, obj->code_page); in com_object_cast()
530 php_com_dotnet_object *obj; in com_object_count() local
533 obj = CDNO_FETCH(object); in com_object_count()
535 if (!V_ISARRAY(&obj->v)) { in com_object_count()
539 SafeArrayGetLBound(V_ARRAY(&obj->v), 1, &lbound); in com_object_count()
540 SafeArrayGetUBound(V_ARRAY(&obj->v), 1, &ubound); in com_object_count()
576 void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable) in php_com_object_enable_event_sink() argument
578 if (obj->sink_dispatch) { in php_com_object_enable_event_sink()
582 if (SUCCEEDED(IDispatch_QueryInterface(V_DISPATCH(&obj->v), in php_com_object_enable_event_sink()
586 &obj->sink_id, &point))) { in php_com_object_enable_event_sink()
589 IConnectionPoint_Advise(point, (IUnknown*)obj->sink_dispatch, &obj->sink_cookie); in php_com_object_enable_event_sink()
591 IConnectionPoint_Unadvise(point, obj->sink_cookie); in php_com_object_enable_event_sink()
602 php_com_dotnet_object *obj = (php_com_dotnet_object*)object; in php_com_object_free_storage() local
604 if (obj->typeinfo) { in php_com_object_free_storage()
605 ITypeInfo_Release(obj->typeinfo); in php_com_object_free_storage()
606 obj->typeinfo = NULL; in php_com_object_free_storage()
609 if (obj->sink_dispatch) { in php_com_object_free_storage()
610 php_com_object_enable_event_sink(obj, FALSE); in php_com_object_free_storage()
611 IDispatch_Release(obj->sink_dispatch); in php_com_object_free_storage()
612 obj->sink_dispatch = NULL; in php_com_object_free_storage()
615 VariantClear(&obj->v); in php_com_object_free_storage()
617 if (obj->method_cache) { in php_com_object_free_storage()
618 zend_hash_destroy(obj->method_cache); in php_com_object_free_storage()
619 FREE_HASHTABLE(obj->method_cache); in php_com_object_free_storage()
621 if (obj->id_of_name_cache) { in php_com_object_free_storage()
622 zend_hash_destroy(obj->id_of_name_cache); in php_com_object_free_storage()
623 FREE_HASHTABLE(obj->id_of_name_cache); in php_com_object_free_storage()
653 php_com_dotnet_object *obj; in php_com_object_new() local
656 obj = emalloc(sizeof(*obj)); in php_com_object_new()
657 memset(obj, 0, sizeof(*obj)); in php_com_object_new()
659 VariantInit(&obj->v); in php_com_object_new()
660 obj->code_page = CP_ACP; in php_com_object_new()
661 obj->ce = ce; in php_com_object_new()
663 zend_object_std_init(&obj->zo, ce); in php_com_object_new()
664 obj->zo.handlers = &php_com_object_handlers; in php_com_object_new()
666 obj->typeinfo = NULL; in php_com_object_new()
668 return (zend_object*)obj; in php_com_object_new()