Lines Matching refs:helper
281 #define CPH_FETCH() php_com_persist_helper *helper = (php_com_persist_helper*)Z_OBJ_P(getThis());
283 #define CPH_NO_OBJ() if (helper->unk == NULL) { php_com_throw_exception(E_INVALIDARG, "No COM obj…
297 static inline HRESULT get_persist_stream(php_com_persist_helper *helper) in get_persist_stream() argument
299 if (!helper->ips && helper->unk) { in get_persist_stream()
300 return IUnknown_QueryInterface(helper->unk, &IID_IPersistStream, &helper->ips); in get_persist_stream()
302 return helper->ips ? S_OK : E_NOTIMPL; in get_persist_stream()
305 static inline HRESULT get_persist_stream_init(php_com_persist_helper *helper) in get_persist_stream_init() argument
307 if (!helper->ipsi && helper->unk) { in get_persist_stream_init()
308 return IUnknown_QueryInterface(helper->unk, &IID_IPersistStreamInit, &helper->ipsi); in get_persist_stream_init()
310 return helper->ipsi ? S_OK : E_NOTIMPL; in get_persist_stream_init()
313 static inline HRESULT get_persist_file(php_com_persist_helper *helper) in get_persist_file() argument
315 if (!helper->ipf && helper->unk) { in get_persist_file()
316 return IUnknown_QueryInterface(helper->unk, &IID_IPersistFile, &helper->ipf); in get_persist_file()
318 return helper->ipf ? S_OK : E_NOTIMPL; in get_persist_file()
335 res = get_persist_file(helper); in CPH_METHOD()
336 if (helper->ipf) { in CPH_METHOD()
337 res = IPersistFile_GetCurFile(helper->ipf, &olename); in CPH_METHOD()
342 &len, helper->codepage); in CPH_METHOD()
377 res = get_persist_file(helper); in CPH_METHOD()
378 if (helper->ipf) { in CPH_METHOD()
390 olefilename = php_com_string_to_olestring(fullpath, strlen(fullpath), helper->codepage); in CPH_METHOD()
393 res = IPersistFile_Save(helper->ipf, olefilename, remember); in CPH_METHOD()
396 res = IPersistFile_GetCurFile(helper->ipf, &olefilename); in CPH_METHOD()
398 IPersistFile_SaveCompleted(helper->ipf, olefilename); in CPH_METHOD()
403 IPersistFile_SaveCompleted(helper->ipf, olefilename); in CPH_METHOD()
438 res = get_persist_file(helper); in CPH_METHOD()
439 if (helper->ipf) { in CPH_METHOD()
449 olefilename = php_com_string_to_olestring(fullpath, strlen(fullpath), helper->codepage); in CPH_METHOD()
452 res = IPersistFile_Load(helper->ipf, olefilename, (DWORD)flags); in CPH_METHOD()
478 res = get_persist_stream_init(helper); in CPH_METHOD()
479 if (helper->ipsi) { in CPH_METHOD()
480 res = IPersistStreamInit_GetSizeMax(helper->ipsi, &size); in CPH_METHOD()
482 res = get_persist_stream(helper); in CPH_METHOD()
483 if (helper->ips) { in CPH_METHOD()
484 res = IPersistStream_GetSizeMax(helper->ips, &size); in CPH_METHOD()
512 res = get_persist_stream_init(helper); in CPH_METHOD()
513 if (helper->ipsi) { in CPH_METHOD()
514 res = IPersistStreamInit_InitNew(helper->ipsi); in CPH_METHOD()
556 if (helper->unk == NULL) { in CPH_METHOD()
566 res = get_persist_stream_init(helper); in CPH_METHOD()
567 if (helper->ipsi) { in CPH_METHOD()
568 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
570 res = get_persist_stream(helper); in CPH_METHOD()
571 if (helper->ips) { in CPH_METHOD()
572 res = IPersistStreamInit_Load(helper->ipsi, stm); in CPH_METHOD()
613 res = get_persist_stream_init(helper); in CPH_METHOD()
614 if (helper->ipsi) { in CPH_METHOD()
615 res = IPersistStreamInit_Save(helper->ipsi, stm, TRUE); in CPH_METHOD()
617 res = get_persist_stream(helper); in CPH_METHOD()
618 if (helper->ips) { in CPH_METHOD()
619 res = IPersistStream_Save(helper->ips, stm, TRUE); in CPH_METHOD()
658 helper->unk = (IUnknown*)V_DISPATCH(&obj->v); in CPH_METHOD()
659 IUnknown_AddRef(helper->unk); in CPH_METHOD()
660 helper->codepage = obj->code_page; in CPH_METHOD()
711 php_com_persist_helper *helper; in helper_new() local
713 helper = emalloc(sizeof(*helper)); in helper_new()
714 memset(helper, 0, sizeof(*helper)); in helper_new()
716 zend_object_std_init(&helper->std, helper_ce); in helper_new()
717 helper->std.handlers = &helper_handlers; in helper_new()
719 return &helper->std; in helper_new()